Skip to main content
Glama
models.py208 kB
# generated by fastapi-codegen: # filename: openapi.yaml # timestamp: 2025-06-29T03:06:15+00:00 from __future__ import annotations from enum import Enum from typing import Any, Dict, List, Optional from pydantic import BaseModel, Field class State(Enum): STATE_UNSPECIFIED = 'STATE_UNSPECIFIED' PROCESSING = 'PROCESSING' SUCCESSFUL = 'SUCCESSFUL' FAILED = 'FAILED' CANCELLED = 'CANCELLED' class BatchOperationMetadata(BaseModel): endTime: Optional[str] = Field( None, description='The time when the batch request is finished and google.longrunning.Operation.done is set to true.', ) state: Optional[State] = Field( None, description='The current state of the batch operation.' ) submitTime: Optional[str] = Field( None, description='The time when the batch request was submitted to the server.' ) class BlockType(Enum): UNKNOWN = 'UNKNOWN' TEXT = 'TEXT' TABLE = 'TABLE' PICTURE = 'PICTURE' RULER = 'RULER' BARCODE = 'BARCODE' class Color(BaseModel): alpha: Optional[float] = Field( None, description='The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).', ) blue: Optional[float] = Field( None, description='The amount of blue in the color as a value in the interval [0, 1].', ) green: Optional[float] = Field( None, description='The amount of green in the color as a value in the interval [0, 1].', ) red: Optional[float] = Field( None, description='The amount of red in the color as a value in the interval [0, 1].', ) class ColorInfo(BaseModel): color: Optional[Color] = Field(None, description='RGB components of the color.') pixelFraction: Optional[float] = Field( None, description='The fraction of pixels the color occupies in the image. Value in range [0, 1].', ) score: Optional[float] = Field( None, description='Image-specific score for this color. Value in range [0, 1].' ) class Type(Enum): UNKNOWN = 'UNKNOWN' SPACE = 'SPACE' SURE_SPACE = 'SURE_SPACE' EOL_SURE_SPACE = 'EOL_SURE_SPACE' HYPHEN = 'HYPHEN' LINE_BREAK = 'LINE_BREAK' class DetectedBreak(BaseModel): isPrefix: Optional[bool] = Field( None, description='True if break prepends the element.' ) type: Optional[Type] = Field(None, description='Detected break type.') class DetectedLanguage(BaseModel): confidence: Optional[float] = Field( None, description='Confidence of detected language. Range [0, 1].' ) languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) class DominantColorsAnnotation(BaseModel): colors: Optional[List[ColorInfo]] = Field( None, description='RGB color values with their score and pixel fraction.' ) class AngerLikelihood(Enum): UNKNOWN = 'UNKNOWN' VERY_UNLIKELY = 'VERY_UNLIKELY' UNLIKELY = 'UNLIKELY' POSSIBLE = 'POSSIBLE' LIKELY = 'LIKELY' VERY_LIKELY = 'VERY_LIKELY' class BlurredLikelihood(Enum): UNKNOWN = 'UNKNOWN' VERY_UNLIKELY = 'VERY_UNLIKELY' UNLIKELY = 'UNLIKELY' POSSIBLE = 'POSSIBLE' LIKELY = 'LIKELY' VERY_LIKELY = 'VERY_LIKELY' class HeadwearLikelihood(Enum): UNKNOWN = 'UNKNOWN' VERY_UNLIKELY = 'VERY_UNLIKELY' UNLIKELY = 'UNLIKELY' POSSIBLE = 'POSSIBLE' LIKELY = 'LIKELY' VERY_LIKELY = 'VERY_LIKELY' class JoyLikelihood(Enum): UNKNOWN = 'UNKNOWN' VERY_UNLIKELY = 'VERY_UNLIKELY' UNLIKELY = 'UNLIKELY' POSSIBLE = 'POSSIBLE' LIKELY = 'LIKELY' VERY_LIKELY = 'VERY_LIKELY' class SorrowLikelihood(Enum): UNKNOWN = 'UNKNOWN' VERY_UNLIKELY = 'VERY_UNLIKELY' UNLIKELY = 'UNLIKELY' POSSIBLE = 'POSSIBLE' LIKELY = 'LIKELY' VERY_LIKELY = 'VERY_LIKELY' class SurpriseLikelihood(Enum): UNKNOWN = 'UNKNOWN' VERY_UNLIKELY = 'VERY_UNLIKELY' UNLIKELY = 'UNLIKELY' POSSIBLE = 'POSSIBLE' LIKELY = 'LIKELY' VERY_LIKELY = 'VERY_LIKELY' class UnderExposedLikelihood(Enum): UNKNOWN = 'UNKNOWN' VERY_UNLIKELY = 'VERY_UNLIKELY' UNLIKELY = 'UNLIKELY' POSSIBLE = 'POSSIBLE' LIKELY = 'LIKELY' VERY_LIKELY = 'VERY_LIKELY' class GcsDestination(BaseModel): uri: Optional[str] = Field( None, description='Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with "filenameprefix". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.', ) class GcsSource(BaseModel): uri: Optional[str] = Field( None, description='Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.', ) class GoogleCloudVisionV1p1beta1ColorInfo(BaseModel): color: Optional[Color] = Field(None, description='RGB components of the color.') pixelFraction: Optional[float] = Field( None, description='The fraction of pixels the color occupies in the image. Value in range [0, 1].', ) score: Optional[float] = Field( None, description='Image-specific score for this color. Value in range [0, 1].' ) class GoogleCloudVisionV1p1beta1CropHintsParams(BaseModel): aspectRatios: Optional[List[float]] = Field( None, description='Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.', ) class GoogleCloudVisionV1p1beta1DominantColorsAnnotation(BaseModel): colors: Optional[List[GoogleCloudVisionV1p1beta1ColorInfo]] = Field( None, description='RGB color values with their score and pixel fraction.' ) class Type1(Enum): UNKNOWN_LANDMARK = 'UNKNOWN_LANDMARK' LEFT_EYE = 'LEFT_EYE' RIGHT_EYE = 'RIGHT_EYE' LEFT_OF_LEFT_EYEBROW = 'LEFT_OF_LEFT_EYEBROW' RIGHT_OF_LEFT_EYEBROW = 'RIGHT_OF_LEFT_EYEBROW' LEFT_OF_RIGHT_EYEBROW = 'LEFT_OF_RIGHT_EYEBROW' RIGHT_OF_RIGHT_EYEBROW = 'RIGHT_OF_RIGHT_EYEBROW' MIDPOINT_BETWEEN_EYES = 'MIDPOINT_BETWEEN_EYES' NOSE_TIP = 'NOSE_TIP' UPPER_LIP = 'UPPER_LIP' LOWER_LIP = 'LOWER_LIP' MOUTH_LEFT = 'MOUTH_LEFT' MOUTH_RIGHT = 'MOUTH_RIGHT' MOUTH_CENTER = 'MOUTH_CENTER' NOSE_BOTTOM_RIGHT = 'NOSE_BOTTOM_RIGHT' NOSE_BOTTOM_LEFT = 'NOSE_BOTTOM_LEFT' NOSE_BOTTOM_CENTER = 'NOSE_BOTTOM_CENTER' LEFT_EYE_TOP_BOUNDARY = 'LEFT_EYE_TOP_BOUNDARY' LEFT_EYE_RIGHT_CORNER = 'LEFT_EYE_RIGHT_CORNER' LEFT_EYE_BOTTOM_BOUNDARY = 'LEFT_EYE_BOTTOM_BOUNDARY' LEFT_EYE_LEFT_CORNER = 'LEFT_EYE_LEFT_CORNER' RIGHT_EYE_TOP_BOUNDARY = 'RIGHT_EYE_TOP_BOUNDARY' RIGHT_EYE_RIGHT_CORNER = 'RIGHT_EYE_RIGHT_CORNER' RIGHT_EYE_BOTTOM_BOUNDARY = 'RIGHT_EYE_BOTTOM_BOUNDARY' RIGHT_EYE_LEFT_CORNER = 'RIGHT_EYE_LEFT_CORNER' LEFT_EYEBROW_UPPER_MIDPOINT = 'LEFT_EYEBROW_UPPER_MIDPOINT' RIGHT_EYEBROW_UPPER_MIDPOINT = 'RIGHT_EYEBROW_UPPER_MIDPOINT' LEFT_EAR_TRAGION = 'LEFT_EAR_TRAGION' RIGHT_EAR_TRAGION = 'RIGHT_EAR_TRAGION' LEFT_EYE_PUPIL = 'LEFT_EYE_PUPIL' RIGHT_EYE_PUPIL = 'RIGHT_EYE_PUPIL' FOREHEAD_GLABELLA = 'FOREHEAD_GLABELLA' CHIN_GNATHION = 'CHIN_GNATHION' CHIN_LEFT_GONION = 'CHIN_LEFT_GONION' CHIN_RIGHT_GONION = 'CHIN_RIGHT_GONION' LEFT_CHEEK_CENTER = 'LEFT_CHEEK_CENTER' RIGHT_CHEEK_CENTER = 'RIGHT_CHEEK_CENTER' class Type2(Enum): TYPE_UNSPECIFIED = 'TYPE_UNSPECIFIED' FACE_DETECTION = 'FACE_DETECTION' LANDMARK_DETECTION = 'LANDMARK_DETECTION' LOGO_DETECTION = 'LOGO_DETECTION' LABEL_DETECTION = 'LABEL_DETECTION' TEXT_DETECTION = 'TEXT_DETECTION' DOCUMENT_TEXT_DETECTION = 'DOCUMENT_TEXT_DETECTION' SAFE_SEARCH_DETECTION = 'SAFE_SEARCH_DETECTION' IMAGE_PROPERTIES = 'IMAGE_PROPERTIES' CROP_HINTS = 'CROP_HINTS' WEB_DETECTION = 'WEB_DETECTION' PRODUCT_SEARCH = 'PRODUCT_SEARCH' OBJECT_LOCALIZATION = 'OBJECT_LOCALIZATION' class GoogleCloudVisionV1p1beta1Feature(BaseModel): maxResults: Optional[int] = Field( None, description='Maximum number of results of this type. Does not apply to `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.', ) model: Optional[str] = Field( None, description='Model to use for the feature. Supported values: "builtin/stable" (the default if unset) and "builtin/latest". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also support "builtin/weekly" for the bleeding edge release updated weekly.', ) type: Optional[Type2] = Field(None, description='The feature type.') class GoogleCloudVisionV1p1beta1GcsDestination(BaseModel): uri: Optional[str] = Field( None, description='Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with "filenameprefix". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.', ) class GoogleCloudVisionV1p1beta1GcsSource(BaseModel): uri: Optional[str] = Field( None, description='Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.', ) class GoogleCloudVisionV1p1beta1ImageAnnotationContext(BaseModel): pageNumber: Optional[int] = Field( None, description='If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.', ) uri: Optional[str] = Field( None, description='The URI of the file used to produce the image.' ) class GoogleCloudVisionV1p1beta1ImageProperties(BaseModel): dominantColors: Optional[GoogleCloudVisionV1p1beta1DominantColorsAnnotation] = ( Field(None, description='If present, dominant colors completed successfully.') ) class GoogleCloudVisionV1p1beta1ImageSource(BaseModel): gcsImageUri: Optional[str] = Field( None, description='**Use `image_uri` instead.** The Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.', ) imageUri: Optional[str] = Field( None, description='The URI of the source image. Can be either: 1. A Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from HTTP/HTTPS URLs, Google cannot guarantee that the request will be completed. Your request may fail if the specified host denies the request (e.g. due to request throttling or DOS prevention), or if Google throttles requests to the site for abuse prevention. You should not depend on externally-hosted images for production applications. When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes precedence.', ) class GoogleCloudVisionV1p1beta1InputConfig(BaseModel): content: Optional[str] = Field( None, description='File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.', ) gcsSource: Optional[GoogleCloudVisionV1p1beta1GcsSource] = Field( None, description='The Google Cloud Storage location to read the input from.' ) mimeType: Optional[str] = Field( None, description='The type of the file. Currently only "application/pdf", "image/tiff" and "image/gif" are supported. Wildcards are not supported.', ) class GoogleCloudVisionV1p1beta1NormalizedVertex(BaseModel): x: Optional[float] = Field(None, description='X coordinate.') y: Optional[float] = Field(None, description='Y coordinate.') class State1(Enum): STATE_UNSPECIFIED = 'STATE_UNSPECIFIED' CREATED = 'CREATED' RUNNING = 'RUNNING' DONE = 'DONE' CANCELLED = 'CANCELLED' class GoogleCloudVisionV1p1beta1OperationMetadata(BaseModel): createTime: Optional[str] = Field( None, description='The time when the batch request was received.' ) state: Optional[State1] = Field( None, description='Current state of the batch operation.' ) updateTime: Optional[str] = Field( None, description='The time when the operation result was last updated.' ) class GoogleCloudVisionV1p1beta1OutputConfig(BaseModel): batchSize: Optional[int] = Field( None, description='The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.', ) gcsDestination: Optional[GoogleCloudVisionV1p1beta1GcsDestination] = Field( None, description='The Google Cloud Storage location to write the output(s) to.' ) class GoogleCloudVisionV1p1beta1Position(BaseModel): x: Optional[float] = Field(None, description='X coordinate.') y: Optional[float] = Field(None, description='Y coordinate.') z: Optional[float] = Field(None, description='Z coordinate (or depth).') class GoogleCloudVisionV1p1beta1ProductKeyValue(BaseModel): key: Optional[str] = Field( None, description='The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.', ) value: Optional[str] = Field( None, description='The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.', ) class GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation(BaseModel): languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) mid: Optional[str] = Field( None, description='Object ID that should align with EntityAnnotation mid.' ) name: Optional[str] = Field( None, description='Object name, expressed in its `language_code` language.' ) score: Optional[float] = Field( None, description='Score of the result. Range [0, 1].' ) class GoogleCloudVisionV1p1beta1Property(BaseModel): name: Optional[str] = Field(None, description='Name of the property.') uint64Value: Optional[str] = Field(None, description='Value of numeric properties.') value: Optional[str] = Field(None, description='Value of the property.') class Adult(Enum): UNKNOWN = 'UNKNOWN' VERY_UNLIKELY = 'VERY_UNLIKELY' UNLIKELY = 'UNLIKELY' POSSIBLE = 'POSSIBLE' LIKELY = 'LIKELY' VERY_LIKELY = 'VERY_LIKELY' class Medical(Enum): UNKNOWN = 'UNKNOWN' VERY_UNLIKELY = 'VERY_UNLIKELY' UNLIKELY = 'UNLIKELY' POSSIBLE = 'POSSIBLE' LIKELY = 'LIKELY' VERY_LIKELY = 'VERY_LIKELY' class Racy(Enum): UNKNOWN = 'UNKNOWN' VERY_UNLIKELY = 'VERY_UNLIKELY' UNLIKELY = 'UNLIKELY' POSSIBLE = 'POSSIBLE' LIKELY = 'LIKELY' VERY_LIKELY = 'VERY_LIKELY' class Spoof(Enum): UNKNOWN = 'UNKNOWN' VERY_UNLIKELY = 'VERY_UNLIKELY' UNLIKELY = 'UNLIKELY' POSSIBLE = 'POSSIBLE' LIKELY = 'LIKELY' VERY_LIKELY = 'VERY_LIKELY' class Violence(Enum): UNKNOWN = 'UNKNOWN' VERY_UNLIKELY = 'VERY_UNLIKELY' UNLIKELY = 'UNLIKELY' POSSIBLE = 'POSSIBLE' LIKELY = 'LIKELY' VERY_LIKELY = 'VERY_LIKELY' class GoogleCloudVisionV1p1beta1SafeSearchAnnotation(BaseModel): adult: Optional[Adult] = Field( None, description='Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.', ) medical: Optional[Medical] = Field( None, description='Likelihood that this is a medical image.' ) racy: Optional[Racy] = Field( None, description='Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.', ) spoof: Optional[Spoof] = Field( None, description="Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", ) violence: Optional[Violence] = Field( None, description='Likelihood that this image contains violent content.' ) class Type3(Enum): UNKNOWN = 'UNKNOWN' SPACE = 'SPACE' SURE_SPACE = 'SURE_SPACE' EOL_SURE_SPACE = 'EOL_SURE_SPACE' HYPHEN = 'HYPHEN' LINE_BREAK = 'LINE_BREAK' class GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak(BaseModel): isPrefix: Optional[bool] = Field( None, description='True if break prepends the element.' ) type: Optional[Type3] = Field(None, description='Detected break type.') class GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage(BaseModel): confidence: Optional[float] = Field( None, description='Confidence of detected language. Range [0, 1].' ) languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) class GoogleCloudVisionV1p1beta1TextAnnotationTextProperty(BaseModel): detectedBreak: Optional[GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak] = ( Field(None, description='Detected start or end of a text segment.') ) detectedLanguages: Optional[ List[GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage] ] = Field( None, description='A list of detected languages together with confidence.' ) class GoogleCloudVisionV1p1beta1TextDetectionParams(BaseModel): advancedOcrOptions: Optional[List[str]] = Field( None, description='A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.', ) enableTextDetectionConfidenceScore: Optional[bool] = Field( None, description='By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence score for TEXT_DETECTION as well.', ) class GoogleCloudVisionV1p1beta1Vertex(BaseModel): x: Optional[int] = Field(None, description='X coordinate.') y: Optional[int] = Field(None, description='Y coordinate.') class GoogleCloudVisionV1p1beta1WebDetectionParams(BaseModel): includeGeoResults: Optional[bool] = Field( None, description='Whether to include results derived from the geo information in the image.', ) class GoogleCloudVisionV1p1beta1WebDetectionWebEntity(BaseModel): description: Optional[str] = Field( None, description='Canonical description of the entity, in English.' ) entityId: Optional[str] = Field(None, description='Opaque entity ID.') score: Optional[float] = Field( None, description='Overall relevancy score for the entity. Not normalized and not comparable across different image queries.', ) class GoogleCloudVisionV1p1beta1WebDetectionWebImage(BaseModel): score: Optional[float] = Field( None, description='(Deprecated) Overall relevancy score for the image.' ) url: Optional[str] = Field(None, description='The result image URL.') class GoogleCloudVisionV1p1beta1WebDetectionWebLabel(BaseModel): label: Optional[str] = Field(None, description='Label for extra metadata.') languageCode: Optional[str] = Field( None, description='The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) class GoogleCloudVisionV1p1beta1WebDetectionWebPage(BaseModel): fullMatchingImages: Optional[ List[GoogleCloudVisionV1p1beta1WebDetectionWebImage] ] = Field( None, description='Fully matching images on the page. Can include resized copies of the query image.', ) pageTitle: Optional[str] = Field( None, description='Title for the web page, may contain HTML markups.' ) partialMatchingImages: Optional[ List[GoogleCloudVisionV1p1beta1WebDetectionWebImage] ] = Field( None, description='Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.', ) score: Optional[float] = Field( None, description='(Deprecated) Overall relevancy score for the web page.' ) url: Optional[str] = Field(None, description='The result web page URL.') class GoogleCloudVisionV1p2beta1ColorInfo(BaseModel): color: Optional[Color] = Field(None, description='RGB components of the color.') pixelFraction: Optional[float] = Field( None, description='The fraction of pixels the color occupies in the image. Value in range [0, 1].', ) score: Optional[float] = Field( None, description='Image-specific score for this color. Value in range [0, 1].' ) class GoogleCloudVisionV1p2beta1DominantColorsAnnotation(BaseModel): colors: Optional[List[GoogleCloudVisionV1p2beta1ColorInfo]] = Field( None, description='RGB color values with their score and pixel fraction.' ) class Type4(Enum): UNKNOWN_LANDMARK = 'UNKNOWN_LANDMARK' LEFT_EYE = 'LEFT_EYE' RIGHT_EYE = 'RIGHT_EYE' LEFT_OF_LEFT_EYEBROW = 'LEFT_OF_LEFT_EYEBROW' RIGHT_OF_LEFT_EYEBROW = 'RIGHT_OF_LEFT_EYEBROW' LEFT_OF_RIGHT_EYEBROW = 'LEFT_OF_RIGHT_EYEBROW' RIGHT_OF_RIGHT_EYEBROW = 'RIGHT_OF_RIGHT_EYEBROW' MIDPOINT_BETWEEN_EYES = 'MIDPOINT_BETWEEN_EYES' NOSE_TIP = 'NOSE_TIP' UPPER_LIP = 'UPPER_LIP' LOWER_LIP = 'LOWER_LIP' MOUTH_LEFT = 'MOUTH_LEFT' MOUTH_RIGHT = 'MOUTH_RIGHT' MOUTH_CENTER = 'MOUTH_CENTER' NOSE_BOTTOM_RIGHT = 'NOSE_BOTTOM_RIGHT' NOSE_BOTTOM_LEFT = 'NOSE_BOTTOM_LEFT' NOSE_BOTTOM_CENTER = 'NOSE_BOTTOM_CENTER' LEFT_EYE_TOP_BOUNDARY = 'LEFT_EYE_TOP_BOUNDARY' LEFT_EYE_RIGHT_CORNER = 'LEFT_EYE_RIGHT_CORNER' LEFT_EYE_BOTTOM_BOUNDARY = 'LEFT_EYE_BOTTOM_BOUNDARY' LEFT_EYE_LEFT_CORNER = 'LEFT_EYE_LEFT_CORNER' RIGHT_EYE_TOP_BOUNDARY = 'RIGHT_EYE_TOP_BOUNDARY' RIGHT_EYE_RIGHT_CORNER = 'RIGHT_EYE_RIGHT_CORNER' RIGHT_EYE_BOTTOM_BOUNDARY = 'RIGHT_EYE_BOTTOM_BOUNDARY' RIGHT_EYE_LEFT_CORNER = 'RIGHT_EYE_LEFT_CORNER' LEFT_EYEBROW_UPPER_MIDPOINT = 'LEFT_EYEBROW_UPPER_MIDPOINT' RIGHT_EYEBROW_UPPER_MIDPOINT = 'RIGHT_EYEBROW_UPPER_MIDPOINT' LEFT_EAR_TRAGION = 'LEFT_EAR_TRAGION' RIGHT_EAR_TRAGION = 'RIGHT_EAR_TRAGION' LEFT_EYE_PUPIL = 'LEFT_EYE_PUPIL' RIGHT_EYE_PUPIL = 'RIGHT_EYE_PUPIL' FOREHEAD_GLABELLA = 'FOREHEAD_GLABELLA' CHIN_GNATHION = 'CHIN_GNATHION' CHIN_LEFT_GONION = 'CHIN_LEFT_GONION' CHIN_RIGHT_GONION = 'CHIN_RIGHT_GONION' LEFT_CHEEK_CENTER = 'LEFT_CHEEK_CENTER' RIGHT_CHEEK_CENTER = 'RIGHT_CHEEK_CENTER' class GoogleCloudVisionV1p2beta1GcsDestination(BaseModel): uri: Optional[str] = Field( None, description='Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with "filenameprefix". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.', ) class GoogleCloudVisionV1p2beta1GcsSource(BaseModel): uri: Optional[str] = Field( None, description='Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.', ) class GoogleCloudVisionV1p2beta1ImageAnnotationContext(BaseModel): pageNumber: Optional[int] = Field( None, description='If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.', ) uri: Optional[str] = Field( None, description='The URI of the file used to produce the image.' ) class GoogleCloudVisionV1p2beta1ImageProperties(BaseModel): dominantColors: Optional[GoogleCloudVisionV1p2beta1DominantColorsAnnotation] = ( Field(None, description='If present, dominant colors completed successfully.') ) class GoogleCloudVisionV1p2beta1InputConfig(BaseModel): content: Optional[str] = Field( None, description='File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.', ) gcsSource: Optional[GoogleCloudVisionV1p2beta1GcsSource] = Field( None, description='The Google Cloud Storage location to read the input from.' ) mimeType: Optional[str] = Field( None, description='The type of the file. Currently only "application/pdf", "image/tiff" and "image/gif" are supported. Wildcards are not supported.', ) class GoogleCloudVisionV1p2beta1NormalizedVertex(BaseModel): x: Optional[float] = Field(None, description='X coordinate.') y: Optional[float] = Field(None, description='Y coordinate.') class GoogleCloudVisionV1p2beta1OperationMetadata(BaseModel): createTime: Optional[str] = Field( None, description='The time when the batch request was received.' ) state: Optional[State1] = Field( None, description='Current state of the batch operation.' ) updateTime: Optional[str] = Field( None, description='The time when the operation result was last updated.' ) class GoogleCloudVisionV1p2beta1OutputConfig(BaseModel): batchSize: Optional[int] = Field( None, description='The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.', ) gcsDestination: Optional[GoogleCloudVisionV1p2beta1GcsDestination] = Field( None, description='The Google Cloud Storage location to write the output(s) to.' ) class GoogleCloudVisionV1p2beta1Position(BaseModel): x: Optional[float] = Field(None, description='X coordinate.') y: Optional[float] = Field(None, description='Y coordinate.') z: Optional[float] = Field(None, description='Z coordinate (or depth).') class GoogleCloudVisionV1p2beta1ProductKeyValue(BaseModel): key: Optional[str] = Field( None, description='The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.', ) value: Optional[str] = Field( None, description='The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.', ) class GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation(BaseModel): languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) mid: Optional[str] = Field( None, description='Object ID that should align with EntityAnnotation mid.' ) name: Optional[str] = Field( None, description='Object name, expressed in its `language_code` language.' ) score: Optional[float] = Field( None, description='Score of the result. Range [0, 1].' ) class GoogleCloudVisionV1p2beta1Property(BaseModel): name: Optional[str] = Field(None, description='Name of the property.') uint64Value: Optional[str] = Field(None, description='Value of numeric properties.') value: Optional[str] = Field(None, description='Value of the property.') class GoogleCloudVisionV1p2beta1SafeSearchAnnotation(BaseModel): adult: Optional[Adult] = Field( None, description='Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.', ) medical: Optional[Medical] = Field( None, description='Likelihood that this is a medical image.' ) racy: Optional[Racy] = Field( None, description='Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.', ) spoof: Optional[Spoof] = Field( None, description="Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", ) violence: Optional[Violence] = Field( None, description='Likelihood that this image contains violent content.' ) class Type5(Enum): UNKNOWN = 'UNKNOWN' SPACE = 'SPACE' SURE_SPACE = 'SURE_SPACE' EOL_SURE_SPACE = 'EOL_SURE_SPACE' HYPHEN = 'HYPHEN' LINE_BREAK = 'LINE_BREAK' class GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak(BaseModel): isPrefix: Optional[bool] = Field( None, description='True if break prepends the element.' ) type: Optional[Type5] = Field(None, description='Detected break type.') class GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage(BaseModel): confidence: Optional[float] = Field( None, description='Confidence of detected language. Range [0, 1].' ) languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) class GoogleCloudVisionV1p2beta1TextAnnotationTextProperty(BaseModel): detectedBreak: Optional[GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak] = ( Field(None, description='Detected start or end of a text segment.') ) detectedLanguages: Optional[ List[GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage] ] = Field( None, description='A list of detected languages together with confidence.' ) class GoogleCloudVisionV1p2beta1Vertex(BaseModel): x: Optional[int] = Field(None, description='X coordinate.') y: Optional[int] = Field(None, description='Y coordinate.') class GoogleCloudVisionV1p2beta1WebDetectionWebEntity(BaseModel): description: Optional[str] = Field( None, description='Canonical description of the entity, in English.' ) entityId: Optional[str] = Field(None, description='Opaque entity ID.') score: Optional[float] = Field( None, description='Overall relevancy score for the entity. Not normalized and not comparable across different image queries.', ) class GoogleCloudVisionV1p2beta1WebDetectionWebImage(BaseModel): score: Optional[float] = Field( None, description='(Deprecated) Overall relevancy score for the image.' ) url: Optional[str] = Field(None, description='The result image URL.') class GoogleCloudVisionV1p2beta1WebDetectionWebLabel(BaseModel): label: Optional[str] = Field(None, description='Label for extra metadata.') languageCode: Optional[str] = Field( None, description='The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) class GoogleCloudVisionV1p2beta1WebDetectionWebPage(BaseModel): fullMatchingImages: Optional[ List[GoogleCloudVisionV1p2beta1WebDetectionWebImage] ] = Field( None, description='Fully matching images on the page. Can include resized copies of the query image.', ) pageTitle: Optional[str] = Field( None, description='Title for the web page, may contain HTML markups.' ) partialMatchingImages: Optional[ List[GoogleCloudVisionV1p2beta1WebDetectionWebImage] ] = Field( None, description='Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.', ) score: Optional[float] = Field( None, description='(Deprecated) Overall relevancy score for the web page.' ) url: Optional[str] = Field(None, description='The result web page URL.') class State3(Enum): STATE_UNSPECIFIED = 'STATE_UNSPECIFIED' PROCESSING = 'PROCESSING' SUCCESSFUL = 'SUCCESSFUL' FAILED = 'FAILED' CANCELLED = 'CANCELLED' class GoogleCloudVisionV1p3beta1BatchOperationMetadata(BaseModel): endTime: Optional[str] = Field( None, description='The time when the batch request is finished and google.longrunning.Operation.done is set to true.', ) state: Optional[State3] = Field( None, description='The current state of the batch operation.' ) submitTime: Optional[str] = Field( None, description='The time when the batch request was submitted to the server.' ) class GoogleCloudVisionV1p3beta1ColorInfo(BaseModel): color: Optional[Color] = Field(None, description='RGB components of the color.') pixelFraction: Optional[float] = Field( None, description='The fraction of pixels the color occupies in the image. Value in range [0, 1].', ) score: Optional[float] = Field( None, description='Image-specific score for this color. Value in range [0, 1].' ) class GoogleCloudVisionV1p3beta1DominantColorsAnnotation(BaseModel): colors: Optional[List[GoogleCloudVisionV1p3beta1ColorInfo]] = Field( None, description='RGB color values with their score and pixel fraction.' ) class Type6(Enum): UNKNOWN_LANDMARK = 'UNKNOWN_LANDMARK' LEFT_EYE = 'LEFT_EYE' RIGHT_EYE = 'RIGHT_EYE' LEFT_OF_LEFT_EYEBROW = 'LEFT_OF_LEFT_EYEBROW' RIGHT_OF_LEFT_EYEBROW = 'RIGHT_OF_LEFT_EYEBROW' LEFT_OF_RIGHT_EYEBROW = 'LEFT_OF_RIGHT_EYEBROW' RIGHT_OF_RIGHT_EYEBROW = 'RIGHT_OF_RIGHT_EYEBROW' MIDPOINT_BETWEEN_EYES = 'MIDPOINT_BETWEEN_EYES' NOSE_TIP = 'NOSE_TIP' UPPER_LIP = 'UPPER_LIP' LOWER_LIP = 'LOWER_LIP' MOUTH_LEFT = 'MOUTH_LEFT' MOUTH_RIGHT = 'MOUTH_RIGHT' MOUTH_CENTER = 'MOUTH_CENTER' NOSE_BOTTOM_RIGHT = 'NOSE_BOTTOM_RIGHT' NOSE_BOTTOM_LEFT = 'NOSE_BOTTOM_LEFT' NOSE_BOTTOM_CENTER = 'NOSE_BOTTOM_CENTER' LEFT_EYE_TOP_BOUNDARY = 'LEFT_EYE_TOP_BOUNDARY' LEFT_EYE_RIGHT_CORNER = 'LEFT_EYE_RIGHT_CORNER' LEFT_EYE_BOTTOM_BOUNDARY = 'LEFT_EYE_BOTTOM_BOUNDARY' LEFT_EYE_LEFT_CORNER = 'LEFT_EYE_LEFT_CORNER' RIGHT_EYE_TOP_BOUNDARY = 'RIGHT_EYE_TOP_BOUNDARY' RIGHT_EYE_RIGHT_CORNER = 'RIGHT_EYE_RIGHT_CORNER' RIGHT_EYE_BOTTOM_BOUNDARY = 'RIGHT_EYE_BOTTOM_BOUNDARY' RIGHT_EYE_LEFT_CORNER = 'RIGHT_EYE_LEFT_CORNER' LEFT_EYEBROW_UPPER_MIDPOINT = 'LEFT_EYEBROW_UPPER_MIDPOINT' RIGHT_EYEBROW_UPPER_MIDPOINT = 'RIGHT_EYEBROW_UPPER_MIDPOINT' LEFT_EAR_TRAGION = 'LEFT_EAR_TRAGION' RIGHT_EAR_TRAGION = 'RIGHT_EAR_TRAGION' LEFT_EYE_PUPIL = 'LEFT_EYE_PUPIL' RIGHT_EYE_PUPIL = 'RIGHT_EYE_PUPIL' FOREHEAD_GLABELLA = 'FOREHEAD_GLABELLA' CHIN_GNATHION = 'CHIN_GNATHION' CHIN_LEFT_GONION = 'CHIN_LEFT_GONION' CHIN_RIGHT_GONION = 'CHIN_RIGHT_GONION' LEFT_CHEEK_CENTER = 'LEFT_CHEEK_CENTER' RIGHT_CHEEK_CENTER = 'RIGHT_CHEEK_CENTER' class GoogleCloudVisionV1p3beta1GcsDestination(BaseModel): uri: Optional[str] = Field( None, description='Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with "filenameprefix". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.', ) class GoogleCloudVisionV1p3beta1GcsSource(BaseModel): uri: Optional[str] = Field( None, description='Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.', ) class GoogleCloudVisionV1p3beta1ImageAnnotationContext(BaseModel): pageNumber: Optional[int] = Field( None, description='If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.', ) uri: Optional[str] = Field( None, description='The URI of the file used to produce the image.' ) class GoogleCloudVisionV1p3beta1ImageProperties(BaseModel): dominantColors: Optional[GoogleCloudVisionV1p3beta1DominantColorsAnnotation] = ( Field(None, description='If present, dominant colors completed successfully.') ) class GoogleCloudVisionV1p3beta1InputConfig(BaseModel): content: Optional[str] = Field( None, description='File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.', ) gcsSource: Optional[GoogleCloudVisionV1p3beta1GcsSource] = Field( None, description='The Google Cloud Storage location to read the input from.' ) mimeType: Optional[str] = Field( None, description='The type of the file. Currently only "application/pdf", "image/tiff" and "image/gif" are supported. Wildcards are not supported.', ) class GoogleCloudVisionV1p3beta1NormalizedVertex(BaseModel): x: Optional[float] = Field(None, description='X coordinate.') y: Optional[float] = Field(None, description='Y coordinate.') class State4(Enum): STATE_UNSPECIFIED = 'STATE_UNSPECIFIED' CREATED = 'CREATED' RUNNING = 'RUNNING' DONE = 'DONE' CANCELLED = 'CANCELLED' class GoogleCloudVisionV1p3beta1OperationMetadata(BaseModel): createTime: Optional[str] = Field( None, description='The time when the batch request was received.' ) state: Optional[State4] = Field( None, description='Current state of the batch operation.' ) updateTime: Optional[str] = Field( None, description='The time when the operation result was last updated.' ) class GoogleCloudVisionV1p3beta1OutputConfig(BaseModel): batchSize: Optional[int] = Field( None, description='The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.', ) gcsDestination: Optional[GoogleCloudVisionV1p3beta1GcsDestination] = Field( None, description='The Google Cloud Storage location to write the output(s) to.' ) class GoogleCloudVisionV1p3beta1Position(BaseModel): x: Optional[float] = Field(None, description='X coordinate.') y: Optional[float] = Field(None, description='Y coordinate.') z: Optional[float] = Field(None, description='Z coordinate (or depth).') class GoogleCloudVisionV1p3beta1ProductKeyValue(BaseModel): key: Optional[str] = Field( None, description='The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.', ) value: Optional[str] = Field( None, description='The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.', ) class GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation(BaseModel): languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) mid: Optional[str] = Field( None, description='Object ID that should align with EntityAnnotation mid.' ) name: Optional[str] = Field( None, description='Object name, expressed in its `language_code` language.' ) score: Optional[float] = Field( None, description='Score of the result. Range [0, 1].' ) class GoogleCloudVisionV1p3beta1Property(BaseModel): name: Optional[str] = Field(None, description='Name of the property.') uint64Value: Optional[str] = Field(None, description='Value of numeric properties.') value: Optional[str] = Field(None, description='Value of the property.') class GoogleCloudVisionV1p3beta1SafeSearchAnnotation(BaseModel): adult: Optional[Adult] = Field( None, description='Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.', ) medical: Optional[Medical] = Field( None, description='Likelihood that this is a medical image.' ) racy: Optional[Racy] = Field( None, description='Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.', ) spoof: Optional[Spoof] = Field( None, description="Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", ) violence: Optional[Violence] = Field( None, description='Likelihood that this image contains violent content.' ) class Type7(Enum): UNKNOWN = 'UNKNOWN' SPACE = 'SPACE' SURE_SPACE = 'SURE_SPACE' EOL_SURE_SPACE = 'EOL_SURE_SPACE' HYPHEN = 'HYPHEN' LINE_BREAK = 'LINE_BREAK' class GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak(BaseModel): isPrefix: Optional[bool] = Field( None, description='True if break prepends the element.' ) type: Optional[Type7] = Field(None, description='Detected break type.') class GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage(BaseModel): confidence: Optional[float] = Field( None, description='Confidence of detected language. Range [0, 1].' ) languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) class GoogleCloudVisionV1p3beta1TextAnnotationTextProperty(BaseModel): detectedBreak: Optional[GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak] = ( Field(None, description='Detected start or end of a text segment.') ) detectedLanguages: Optional[ List[GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage] ] = Field( None, description='A list of detected languages together with confidence.' ) class GoogleCloudVisionV1p3beta1Vertex(BaseModel): x: Optional[int] = Field(None, description='X coordinate.') y: Optional[int] = Field(None, description='Y coordinate.') class GoogleCloudVisionV1p3beta1WebDetectionWebEntity(BaseModel): description: Optional[str] = Field( None, description='Canonical description of the entity, in English.' ) entityId: Optional[str] = Field(None, description='Opaque entity ID.') score: Optional[float] = Field( None, description='Overall relevancy score for the entity. Not normalized and not comparable across different image queries.', ) class GoogleCloudVisionV1p3beta1WebDetectionWebImage(BaseModel): score: Optional[float] = Field( None, description='(Deprecated) Overall relevancy score for the image.' ) url: Optional[str] = Field(None, description='The result image URL.') class GoogleCloudVisionV1p3beta1WebDetectionWebLabel(BaseModel): label: Optional[str] = Field(None, description='Label for extra metadata.') languageCode: Optional[str] = Field( None, description='The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) class GoogleCloudVisionV1p3beta1WebDetectionWebPage(BaseModel): fullMatchingImages: Optional[ List[GoogleCloudVisionV1p3beta1WebDetectionWebImage] ] = Field( None, description='Fully matching images on the page. Can include resized copies of the query image.', ) pageTitle: Optional[str] = Field( None, description='Title for the web page, may contain HTML markups.' ) partialMatchingImages: Optional[ List[GoogleCloudVisionV1p3beta1WebDetectionWebImage] ] = Field( None, description='Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.', ) score: Optional[float] = Field( None, description='(Deprecated) Overall relevancy score for the web page.' ) url: Optional[str] = Field(None, description='The result web page URL.') class State5(Enum): STATE_UNSPECIFIED = 'STATE_UNSPECIFIED' PROCESSING = 'PROCESSING' SUCCESSFUL = 'SUCCESSFUL' FAILED = 'FAILED' CANCELLED = 'CANCELLED' class GoogleCloudVisionV1p4beta1BatchOperationMetadata(BaseModel): endTime: Optional[str] = Field( None, description='The time when the batch request is finished and google.longrunning.Operation.done is set to true.', ) state: Optional[State5] = Field( None, description='The current state of the batch operation.' ) submitTime: Optional[str] = Field( None, description='The time when the batch request was submitted to the server.' ) class GoogleCloudVisionV1p4beta1Celebrity(BaseModel): description: Optional[str] = Field(None, description="The Celebrity's description.") displayName: Optional[str] = Field( None, description="The Celebrity's display name." ) name: Optional[str] = Field( None, description='The resource name of the preloaded Celebrity. Has the format `builtin/{mid}`.', ) class GoogleCloudVisionV1p4beta1ColorInfo(BaseModel): color: Optional[Color] = Field(None, description='RGB components of the color.') pixelFraction: Optional[float] = Field( None, description='The fraction of pixels the color occupies in the image. Value in range [0, 1].', ) score: Optional[float] = Field( None, description='Image-specific score for this color. Value in range [0, 1].' ) class GoogleCloudVisionV1p4beta1DominantColorsAnnotation(BaseModel): colors: Optional[List[GoogleCloudVisionV1p4beta1ColorInfo]] = Field( None, description='RGB color values with their score and pixel fraction.' ) class Type8(Enum): UNKNOWN_LANDMARK = 'UNKNOWN_LANDMARK' LEFT_EYE = 'LEFT_EYE' RIGHT_EYE = 'RIGHT_EYE' LEFT_OF_LEFT_EYEBROW = 'LEFT_OF_LEFT_EYEBROW' RIGHT_OF_LEFT_EYEBROW = 'RIGHT_OF_LEFT_EYEBROW' LEFT_OF_RIGHT_EYEBROW = 'LEFT_OF_RIGHT_EYEBROW' RIGHT_OF_RIGHT_EYEBROW = 'RIGHT_OF_RIGHT_EYEBROW' MIDPOINT_BETWEEN_EYES = 'MIDPOINT_BETWEEN_EYES' NOSE_TIP = 'NOSE_TIP' UPPER_LIP = 'UPPER_LIP' LOWER_LIP = 'LOWER_LIP' MOUTH_LEFT = 'MOUTH_LEFT' MOUTH_RIGHT = 'MOUTH_RIGHT' MOUTH_CENTER = 'MOUTH_CENTER' NOSE_BOTTOM_RIGHT = 'NOSE_BOTTOM_RIGHT' NOSE_BOTTOM_LEFT = 'NOSE_BOTTOM_LEFT' NOSE_BOTTOM_CENTER = 'NOSE_BOTTOM_CENTER' LEFT_EYE_TOP_BOUNDARY = 'LEFT_EYE_TOP_BOUNDARY' LEFT_EYE_RIGHT_CORNER = 'LEFT_EYE_RIGHT_CORNER' LEFT_EYE_BOTTOM_BOUNDARY = 'LEFT_EYE_BOTTOM_BOUNDARY' LEFT_EYE_LEFT_CORNER = 'LEFT_EYE_LEFT_CORNER' RIGHT_EYE_TOP_BOUNDARY = 'RIGHT_EYE_TOP_BOUNDARY' RIGHT_EYE_RIGHT_CORNER = 'RIGHT_EYE_RIGHT_CORNER' RIGHT_EYE_BOTTOM_BOUNDARY = 'RIGHT_EYE_BOTTOM_BOUNDARY' RIGHT_EYE_LEFT_CORNER = 'RIGHT_EYE_LEFT_CORNER' LEFT_EYEBROW_UPPER_MIDPOINT = 'LEFT_EYEBROW_UPPER_MIDPOINT' RIGHT_EYEBROW_UPPER_MIDPOINT = 'RIGHT_EYEBROW_UPPER_MIDPOINT' LEFT_EAR_TRAGION = 'LEFT_EAR_TRAGION' RIGHT_EAR_TRAGION = 'RIGHT_EAR_TRAGION' LEFT_EYE_PUPIL = 'LEFT_EYE_PUPIL' RIGHT_EYE_PUPIL = 'RIGHT_EYE_PUPIL' FOREHEAD_GLABELLA = 'FOREHEAD_GLABELLA' CHIN_GNATHION = 'CHIN_GNATHION' CHIN_LEFT_GONION = 'CHIN_LEFT_GONION' CHIN_RIGHT_GONION = 'CHIN_RIGHT_GONION' LEFT_CHEEK_CENTER = 'LEFT_CHEEK_CENTER' RIGHT_CHEEK_CENTER = 'RIGHT_CHEEK_CENTER' class GoogleCloudVisionV1p4beta1FaceRecognitionResult(BaseModel): celebrity: Optional[GoogleCloudVisionV1p4beta1Celebrity] = Field( None, description='The Celebrity that this face was matched to.' ) confidence: Optional[float] = Field( None, description='Recognition confidence. Range [0, 1].' ) class GoogleCloudVisionV1p4beta1GcsDestination(BaseModel): uri: Optional[str] = Field( None, description='Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with "filenameprefix". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.', ) class GoogleCloudVisionV1p4beta1GcsSource(BaseModel): uri: Optional[str] = Field( None, description='Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.', ) class GoogleCloudVisionV1p4beta1ImageAnnotationContext(BaseModel): pageNumber: Optional[int] = Field( None, description='If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.', ) uri: Optional[str] = Field( None, description='The URI of the file used to produce the image.' ) class GoogleCloudVisionV1p4beta1ImageProperties(BaseModel): dominantColors: Optional[GoogleCloudVisionV1p4beta1DominantColorsAnnotation] = ( Field(None, description='If present, dominant colors completed successfully.') ) class GoogleCloudVisionV1p4beta1InputConfig(BaseModel): content: Optional[str] = Field( None, description='File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.', ) gcsSource: Optional[GoogleCloudVisionV1p4beta1GcsSource] = Field( None, description='The Google Cloud Storage location to read the input from.' ) mimeType: Optional[str] = Field( None, description='The type of the file. Currently only "application/pdf", "image/tiff" and "image/gif" are supported. Wildcards are not supported.', ) class GoogleCloudVisionV1p4beta1NormalizedVertex(BaseModel): x: Optional[float] = Field(None, description='X coordinate.') y: Optional[float] = Field(None, description='Y coordinate.') class State6(Enum): STATE_UNSPECIFIED = 'STATE_UNSPECIFIED' CREATED = 'CREATED' RUNNING = 'RUNNING' DONE = 'DONE' CANCELLED = 'CANCELLED' class GoogleCloudVisionV1p4beta1OperationMetadata(BaseModel): createTime: Optional[str] = Field( None, description='The time when the batch request was received.' ) state: Optional[State6] = Field( None, description='Current state of the batch operation.' ) updateTime: Optional[str] = Field( None, description='The time when the operation result was last updated.' ) class GoogleCloudVisionV1p4beta1OutputConfig(BaseModel): batchSize: Optional[int] = Field( None, description='The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.', ) gcsDestination: Optional[GoogleCloudVisionV1p4beta1GcsDestination] = Field( None, description='The Google Cloud Storage location to write the output(s) to.' ) class GoogleCloudVisionV1p4beta1Position(BaseModel): x: Optional[float] = Field(None, description='X coordinate.') y: Optional[float] = Field(None, description='Y coordinate.') z: Optional[float] = Field(None, description='Z coordinate (or depth).') class GoogleCloudVisionV1p4beta1ProductKeyValue(BaseModel): key: Optional[str] = Field( None, description='The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.', ) value: Optional[str] = Field( None, description='The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.', ) class GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation(BaseModel): languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) mid: Optional[str] = Field( None, description='Object ID that should align with EntityAnnotation mid.' ) name: Optional[str] = Field( None, description='Object name, expressed in its `language_code` language.' ) score: Optional[float] = Field( None, description='Score of the result. Range [0, 1].' ) class GoogleCloudVisionV1p4beta1Property(BaseModel): name: Optional[str] = Field(None, description='Name of the property.') uint64Value: Optional[str] = Field(None, description='Value of numeric properties.') value: Optional[str] = Field(None, description='Value of the property.') class GoogleCloudVisionV1p4beta1SafeSearchAnnotation(BaseModel): adult: Optional[Adult] = Field( None, description='Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.', ) medical: Optional[Medical] = Field( None, description='Likelihood that this is a medical image.' ) racy: Optional[Racy] = Field( None, description='Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.', ) spoof: Optional[Spoof] = Field( None, description="Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", ) violence: Optional[Violence] = Field( None, description='Likelihood that this image contains violent content.' ) class Type9(Enum): UNKNOWN = 'UNKNOWN' SPACE = 'SPACE' SURE_SPACE = 'SURE_SPACE' EOL_SURE_SPACE = 'EOL_SURE_SPACE' HYPHEN = 'HYPHEN' LINE_BREAK = 'LINE_BREAK' class GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak(BaseModel): isPrefix: Optional[bool] = Field( None, description='True if break prepends the element.' ) type: Optional[Type9] = Field(None, description='Detected break type.') class GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage(BaseModel): confidence: Optional[float] = Field( None, description='Confidence of detected language. Range [0, 1].' ) languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) class GoogleCloudVisionV1p4beta1TextAnnotationTextProperty(BaseModel): detectedBreak: Optional[GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak] = ( Field(None, description='Detected start or end of a text segment.') ) detectedLanguages: Optional[ List[GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage] ] = Field( None, description='A list of detected languages together with confidence.' ) class GoogleCloudVisionV1p4beta1Vertex(BaseModel): x: Optional[int] = Field(None, description='X coordinate.') y: Optional[int] = Field(None, description='Y coordinate.') class GoogleCloudVisionV1p4beta1WebDetectionWebEntity(BaseModel): description: Optional[str] = Field( None, description='Canonical description of the entity, in English.' ) entityId: Optional[str] = Field(None, description='Opaque entity ID.') score: Optional[float] = Field( None, description='Overall relevancy score for the entity. Not normalized and not comparable across different image queries.', ) class GoogleCloudVisionV1p4beta1WebDetectionWebImage(BaseModel): score: Optional[float] = Field( None, description='(Deprecated) Overall relevancy score for the image.' ) url: Optional[str] = Field(None, description='The result image URL.') class GoogleCloudVisionV1p4beta1WebDetectionWebLabel(BaseModel): label: Optional[str] = Field(None, description='Label for extra metadata.') languageCode: Optional[str] = Field( None, description='The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) class GoogleCloudVisionV1p4beta1WebDetectionWebPage(BaseModel): fullMatchingImages: Optional[ List[GoogleCloudVisionV1p4beta1WebDetectionWebImage] ] = Field( None, description='Fully matching images on the page. Can include resized copies of the query image.', ) pageTitle: Optional[str] = Field( None, description='Title for the web page, may contain HTML markups.' ) partialMatchingImages: Optional[ List[GoogleCloudVisionV1p4beta1WebDetectionWebImage] ] = Field( None, description='Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.', ) score: Optional[float] = Field( None, description='(Deprecated) Overall relevancy score for the web page.' ) url: Optional[str] = Field(None, description='The result web page URL.') class ImageAnnotationContext(BaseModel): pageNumber: Optional[int] = Field( None, description='If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.', ) uri: Optional[str] = Field( None, description='The URI of the file used to produce the image.' ) class ImageProperties(BaseModel): dominantColors: Optional[DominantColorsAnnotation] = Field( None, description='If present, dominant colors completed successfully.' ) class InputConfig(BaseModel): content: Optional[str] = Field( None, description='File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.', ) gcsSource: Optional[GcsSource] = Field( None, description='The Google Cloud Storage location to read the input from.' ) mimeType: Optional[str] = Field( None, description='The type of the file. Currently only "application/pdf", "image/tiff" and "image/gif" are supported. Wildcards are not supported.', ) class KeyValue(BaseModel): key: Optional[str] = Field( None, description='The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.', ) value: Optional[str] = Field( None, description='The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.', ) class Type10(Enum): UNKNOWN_LANDMARK = 'UNKNOWN_LANDMARK' LEFT_EYE = 'LEFT_EYE' RIGHT_EYE = 'RIGHT_EYE' LEFT_OF_LEFT_EYEBROW = 'LEFT_OF_LEFT_EYEBROW' RIGHT_OF_LEFT_EYEBROW = 'RIGHT_OF_LEFT_EYEBROW' LEFT_OF_RIGHT_EYEBROW = 'LEFT_OF_RIGHT_EYEBROW' RIGHT_OF_RIGHT_EYEBROW = 'RIGHT_OF_RIGHT_EYEBROW' MIDPOINT_BETWEEN_EYES = 'MIDPOINT_BETWEEN_EYES' NOSE_TIP = 'NOSE_TIP' UPPER_LIP = 'UPPER_LIP' LOWER_LIP = 'LOWER_LIP' MOUTH_LEFT = 'MOUTH_LEFT' MOUTH_RIGHT = 'MOUTH_RIGHT' MOUTH_CENTER = 'MOUTH_CENTER' NOSE_BOTTOM_RIGHT = 'NOSE_BOTTOM_RIGHT' NOSE_BOTTOM_LEFT = 'NOSE_BOTTOM_LEFT' NOSE_BOTTOM_CENTER = 'NOSE_BOTTOM_CENTER' LEFT_EYE_TOP_BOUNDARY = 'LEFT_EYE_TOP_BOUNDARY' LEFT_EYE_RIGHT_CORNER = 'LEFT_EYE_RIGHT_CORNER' LEFT_EYE_BOTTOM_BOUNDARY = 'LEFT_EYE_BOTTOM_BOUNDARY' LEFT_EYE_LEFT_CORNER = 'LEFT_EYE_LEFT_CORNER' RIGHT_EYE_TOP_BOUNDARY = 'RIGHT_EYE_TOP_BOUNDARY' RIGHT_EYE_RIGHT_CORNER = 'RIGHT_EYE_RIGHT_CORNER' RIGHT_EYE_BOTTOM_BOUNDARY = 'RIGHT_EYE_BOTTOM_BOUNDARY' RIGHT_EYE_LEFT_CORNER = 'RIGHT_EYE_LEFT_CORNER' LEFT_EYEBROW_UPPER_MIDPOINT = 'LEFT_EYEBROW_UPPER_MIDPOINT' RIGHT_EYEBROW_UPPER_MIDPOINT = 'RIGHT_EYEBROW_UPPER_MIDPOINT' LEFT_EAR_TRAGION = 'LEFT_EAR_TRAGION' RIGHT_EAR_TRAGION = 'RIGHT_EAR_TRAGION' LEFT_EYE_PUPIL = 'LEFT_EYE_PUPIL' RIGHT_EYE_PUPIL = 'RIGHT_EYE_PUPIL' FOREHEAD_GLABELLA = 'FOREHEAD_GLABELLA' CHIN_GNATHION = 'CHIN_GNATHION' CHIN_LEFT_GONION = 'CHIN_LEFT_GONION' CHIN_RIGHT_GONION = 'CHIN_RIGHT_GONION' LEFT_CHEEK_CENTER = 'LEFT_CHEEK_CENTER' RIGHT_CHEEK_CENTER = 'RIGHT_CHEEK_CENTER' class LatLng(BaseModel): latitude: Optional[float] = Field( None, description='The latitude in degrees. It must be in the range [-90.0, +90.0].', ) longitude: Optional[float] = Field( None, description='The longitude in degrees. It must be in the range [-180.0, +180.0].', ) class LocationInfo(BaseModel): latLng: Optional[LatLng] = Field(None, description='lat/long location coordinates.') class NormalizedVertex(BaseModel): x: Optional[float] = Field(None, description='X coordinate.') y: Optional[float] = Field(None, description='Y coordinate.') class ObjectAnnotation(BaseModel): languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) mid: Optional[str] = Field( None, description='Object ID that should align with EntityAnnotation mid.' ) name: Optional[str] = Field( None, description='Object name, expressed in its `language_code` language.' ) score: Optional[float] = Field( None, description='Score of the result. Range [0, 1].' ) class OperationMetadata(BaseModel): createTime: Optional[str] = Field( None, description='The time when the batch request was received.' ) state: Optional[State6] = Field( None, description='Current state of the batch operation.' ) updateTime: Optional[str] = Field( None, description='The time when the operation result was last updated.' ) class OutputConfig(BaseModel): batchSize: Optional[int] = Field( None, description='The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.', ) gcsDestination: Optional[GcsDestination] = Field( None, description='The Google Cloud Storage location to write the output(s) to.' ) class Position(BaseModel): x: Optional[float] = Field(None, description='X coordinate.') y: Optional[float] = Field(None, description='Y coordinate.') z: Optional[float] = Field(None, description='Z coordinate (or depth).') class Product(BaseModel): description: Optional[str] = Field( None, description='User-provided metadata to be stored with this product. Must be at most 4096 characters long.', ) displayName: Optional[str] = Field( None, description='The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.', ) name: Optional[str] = Field( None, description='The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.', ) productCategory: Optional[str] = Field( None, description='Immutable. The category for the product identified by the reference image. This should be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products.', ) productLabels: Optional[List[KeyValue]] = Field( None, description='Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. "1199". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.', ) class Property(BaseModel): name: Optional[str] = Field(None, description='Name of the property.') uint64Value: Optional[str] = Field(None, description='Value of numeric properties.') value: Optional[str] = Field(None, description='Value of the property.') class Result(BaseModel): image: Optional[str] = Field( None, description='The resource name of the image from the product that is the closest match to the query.', ) product: Optional[Product] = Field(None, description='The Product.') score: Optional[float] = Field( None, description='A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).', ) class SafeSearchAnnotation(BaseModel): adult: Optional[Adult] = Field( None, description='Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.', ) medical: Optional[Medical] = Field( None, description='Likelihood that this is a medical image.' ) racy: Optional[Racy] = Field( None, description='Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.', ) spoof: Optional[Spoof] = Field( None, description="Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", ) violence: Optional[Violence] = Field( None, description='Likelihood that this image contains violent content.' ) class Status(BaseModel): code: Optional[int] = Field( None, description='The status code, which should be an enum value of google.rpc.Code.', ) details: Optional[List[Dict[str, Any]]] = Field( None, description='A list of messages that carry the error details. There is a common set of message types for APIs to use.', ) message: Optional[str] = Field( None, description='A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.', ) class TextProperty(BaseModel): detectedBreak: Optional[DetectedBreak] = Field( None, description='Detected start or end of a text segment.' ) detectedLanguages: Optional[List[DetectedLanguage]] = Field( None, description='A list of detected languages together with confidence.' ) class Vertex(BaseModel): x: Optional[int] = Field(None, description='X coordinate.') y: Optional[int] = Field(None, description='Y coordinate.') class WebEntity(BaseModel): description: Optional[str] = Field( None, description='Canonical description of the entity, in English.' ) entityId: Optional[str] = Field(None, description='Opaque entity ID.') score: Optional[float] = Field( None, description='Overall relevancy score for the entity. Not normalized and not comparable across different image queries.', ) class WebImage(BaseModel): score: Optional[float] = Field( None, description='(Deprecated) Overall relevancy score for the image.' ) url: Optional[str] = Field(None, description='The result image URL.') class WebLabel(BaseModel): label: Optional[str] = Field(None, description='Label for extra metadata.') languageCode: Optional[str] = Field( None, description='The BCP-47 language code for `label`, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) class WebPage(BaseModel): fullMatchingImages: Optional[List[WebImage]] = Field( None, description='Fully matching images on the page. Can include resized copies of the query image.', ) pageTitle: Optional[str] = Field( None, description='Title for the web page, may contain HTML markups.' ) partialMatchingImages: Optional[List[WebImage]] = Field( None, description='Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.', ) score: Optional[float] = Field( None, description='(Deprecated) Overall relevancy score for the web page.' ) url: Optional[str] = Field(None, description='The result web page URL.') class FieldXgafv(Enum): field_1 = '1' field_2 = '2' class Alt(Enum): json = 'json' media = 'media' proto = 'proto' class AsyncAnnotateFileResponse(BaseModel): outputConfig: Optional[OutputConfig] = Field( None, description='The output location and metadata from AsyncAnnotateFileRequest.', ) class AsyncBatchAnnotateFilesResponse(BaseModel): responses: Optional[List[AsyncAnnotateFileResponse]] = Field( None, description='The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.', ) class AsyncBatchAnnotateImagesResponse(BaseModel): outputConfig: Optional[OutputConfig] = Field( None, description='The output location and metadata from AsyncBatchAnnotateImagesRequest.', ) class BoundingPoly(BaseModel): normalizedVertices: Optional[List[NormalizedVertex]] = Field( None, description='The bounding polygon normalized vertices.' ) vertices: Optional[List[Vertex]] = Field( None, description='The bounding polygon vertices.' ) class CropHint(BaseModel): boundingPoly: Optional[BoundingPoly] = Field( None, description="The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale.", ) confidence: Optional[float] = Field( None, description='Confidence of this being a salient region. Range [0, 1].' ) importanceFraction: Optional[float] = Field( None, description='Fraction of importance of this salient region with respect to the original image.', ) class CropHintsAnnotation(BaseModel): cropHints: Optional[List[CropHint]] = Field(None, description='Crop hint results.') class EntityAnnotation(BaseModel): boundingPoly: Optional[BoundingPoly] = Field( None, description='Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features.', ) confidence: Optional[float] = Field( None, description='**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].', ) description: Optional[str] = Field( None, description='Entity textual description, expressed in its `locale` language.', ) locale: Optional[str] = Field( None, description='The language code for the locale in which the entity textual `description` is expressed.', ) locations: Optional[List[LocationInfo]] = Field( None, description='The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.', ) mid: Optional[str] = Field( None, description='Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).', ) properties: Optional[List[Property]] = Field( None, description='Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.', ) score: Optional[float] = Field( None, description='Overall score of the result. Range [0, 1].' ) topicality: Optional[float] = Field( None, description='The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].', ) class GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse(BaseModel): outputConfig: Optional[GoogleCloudVisionV1p1beta1OutputConfig] = Field( None, description='The output location and metadata from AsyncAnnotateFileRequest.', ) class GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse(BaseModel): responses: Optional[List[GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse]] = ( Field( None, description='The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.', ) ) class GoogleCloudVisionV1p1beta1BoundingPoly(BaseModel): normalizedVertices: Optional[List[GoogleCloudVisionV1p1beta1NormalizedVertex]] = ( Field(None, description='The bounding polygon normalized vertices.') ) vertices: Optional[List[GoogleCloudVisionV1p1beta1Vertex]] = Field( None, description='The bounding polygon vertices.' ) class GoogleCloudVisionV1p1beta1CropHint(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p1beta1BoundingPoly] = Field( None, description="The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale.", ) confidence: Optional[float] = Field( None, description='Confidence of this being a salient region. Range [0, 1].' ) importanceFraction: Optional[float] = Field( None, description='Fraction of importance of this salient region with respect to the original image.', ) class GoogleCloudVisionV1p1beta1CropHintsAnnotation(BaseModel): cropHints: Optional[List[GoogleCloudVisionV1p1beta1CropHint]] = Field( None, description='Crop hint results.' ) class GoogleCloudVisionV1p1beta1FaceAnnotationLandmark(BaseModel): position: Optional[GoogleCloudVisionV1p1beta1Position] = Field( None, description='Face landmark position.' ) type: Optional[Type1] = Field(None, description='Face landmark type.') class GoogleCloudVisionV1p1beta1Image(BaseModel): content: Optional[str] = Field( None, description='Image content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateImages requests. It does not work for AsyncBatchAnnotateImages requests.', ) source: Optional[GoogleCloudVisionV1p1beta1ImageSource] = Field( None, description='Google Cloud Storage image location, or publicly-accessible image URL. If both `content` and `source` are provided for an image, `content` takes precedence and is used to perform the image annotation request.', ) class GoogleCloudVisionV1p1beta1LatLongRect(BaseModel): maxLatLng: Optional[LatLng] = Field(None, description='Max lat/long pair.') minLatLng: Optional[LatLng] = Field(None, description='Min lat/long pair.') class GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p1beta1BoundingPoly] = Field( None, description='Image region to which this object belongs. This must be populated.', ) languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) mid: Optional[str] = Field( None, description='Object ID that should align with EntityAnnotation mid.' ) name: Optional[str] = Field( None, description='Object name, expressed in its `language_code` language.' ) score: Optional[float] = Field( None, description='Score of the result. Range [0, 1].' ) class GoogleCloudVisionV1p1beta1LocationInfo(BaseModel): latLng: Optional[LatLng] = Field(None, description='lat/long location coordinates.') class GoogleCloudVisionV1p1beta1Product(BaseModel): description: Optional[str] = Field( None, description='User-provided metadata to be stored with this product. Must be at most 4096 characters long.', ) displayName: Optional[str] = Field( None, description='The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.', ) name: Optional[str] = Field( None, description='The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.', ) productCategory: Optional[str] = Field( None, description='Immutable. The category for the product identified by the reference image. This should be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products.', ) productLabels: Optional[List[GoogleCloudVisionV1p1beta1ProductKeyValue]] = Field( None, description='Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. "1199". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.', ) class GoogleCloudVisionV1p1beta1ProductSearchParams(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p1beta1BoundingPoly] = Field( None, description='The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied.', ) filter: Optional[str] = Field( None, description='The filtering expression. This can be used to restrict search results based on Product labels. We currently support an AND of OR of key-value expressions, where each expression within an OR must have the same key. An \'=\' should be used to connect the key and value. For example, "(color = red OR color = blue) AND brand = Google" is acceptable, but "(color = red OR brand = Google)" is not acceptable. "color: red" is not acceptable because it uses a \':\' instead of an \'=\'.', ) productCategories: Optional[List[str]] = Field( None, description='The list of product categories to search in. Currently, we only consider the first category, and either "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1", or "general-v1" should be specified. The legacy categories "homegoods", "apparel", and "toys" are still supported but will be deprecated. For new products, please use "homegoods-v2", "apparel-v2", or "toys-v2" for better product search accuracy. It is recommended to migrate existing products to these categories as well.', ) productSet: Optional[str] = Field( None, description='The resource name of a ProductSet to be searched for similar images. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.', ) class GoogleCloudVisionV1p1beta1ProductSearchResultsResult(BaseModel): image: Optional[str] = Field( None, description='The resource name of the image from the product that is the closest match to the query.', ) product: Optional[GoogleCloudVisionV1p1beta1Product] = Field( None, description='The Product.' ) score: Optional[float] = Field( None, description='A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).', ) class GoogleCloudVisionV1p1beta1Symbol(BaseModel): boundingBox: Optional[GoogleCloudVisionV1p1beta1BoundingPoly] = Field( None, description="The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the symbol. Range [0, 1].' ) property: Optional[GoogleCloudVisionV1p1beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the symbol.' ) text: Optional[str] = Field( None, description='The actual UTF-8 representation of the symbol.' ) class GoogleCloudVisionV1p1beta1WebDetection(BaseModel): bestGuessLabels: Optional[List[GoogleCloudVisionV1p1beta1WebDetectionWebLabel]] = ( Field( None, description="The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", ) ) fullMatchingImages: Optional[ List[GoogleCloudVisionV1p1beta1WebDetectionWebImage] ] = Field( None, description='Fully matching images from the Internet. Can include resized copies of the query image.', ) pagesWithMatchingImages: Optional[ List[GoogleCloudVisionV1p1beta1WebDetectionWebPage] ] = Field( None, description='Web pages containing the matching images from the Internet.' ) partialMatchingImages: Optional[ List[GoogleCloudVisionV1p1beta1WebDetectionWebImage] ] = Field( None, description='Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.', ) visuallySimilarImages: Optional[ List[GoogleCloudVisionV1p1beta1WebDetectionWebImage] ] = Field(None, description='The visually similar image results.') webEntities: Optional[List[GoogleCloudVisionV1p1beta1WebDetectionWebEntity]] = ( Field(None, description='Deduced entities from similar images on the Internet.') ) class GoogleCloudVisionV1p1beta1Word(BaseModel): boundingBox: Optional[GoogleCloudVisionV1p1beta1BoundingPoly] = Field( None, description="The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the word. Range [0, 1].' ) property: Optional[GoogleCloudVisionV1p1beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the word.' ) symbols: Optional[List[GoogleCloudVisionV1p1beta1Symbol]] = Field( None, description='List of symbols in the word. The order of the symbols follows the natural reading order.', ) class GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse(BaseModel): outputConfig: Optional[GoogleCloudVisionV1p2beta1OutputConfig] = Field( None, description='The output location and metadata from AsyncAnnotateFileRequest.', ) class GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse(BaseModel): responses: Optional[List[GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse]] = ( Field( None, description='The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.', ) ) class GoogleCloudVisionV1p2beta1BoundingPoly(BaseModel): normalizedVertices: Optional[List[GoogleCloudVisionV1p2beta1NormalizedVertex]] = ( Field(None, description='The bounding polygon normalized vertices.') ) vertices: Optional[List[GoogleCloudVisionV1p2beta1Vertex]] = Field( None, description='The bounding polygon vertices.' ) class GoogleCloudVisionV1p2beta1CropHint(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p2beta1BoundingPoly] = Field( None, description="The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale.", ) confidence: Optional[float] = Field( None, description='Confidence of this being a salient region. Range [0, 1].' ) importanceFraction: Optional[float] = Field( None, description='Fraction of importance of this salient region with respect to the original image.', ) class GoogleCloudVisionV1p2beta1CropHintsAnnotation(BaseModel): cropHints: Optional[List[GoogleCloudVisionV1p2beta1CropHint]] = Field( None, description='Crop hint results.' ) class GoogleCloudVisionV1p2beta1FaceAnnotationLandmark(BaseModel): position: Optional[GoogleCloudVisionV1p2beta1Position] = Field( None, description='Face landmark position.' ) type: Optional[Type4] = Field(None, description='Face landmark type.') class GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p2beta1BoundingPoly] = Field( None, description='Image region to which this object belongs. This must be populated.', ) languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) mid: Optional[str] = Field( None, description='Object ID that should align with EntityAnnotation mid.' ) name: Optional[str] = Field( None, description='Object name, expressed in its `language_code` language.' ) score: Optional[float] = Field( None, description='Score of the result. Range [0, 1].' ) class GoogleCloudVisionV1p2beta1LocationInfo(BaseModel): latLng: Optional[LatLng] = Field(None, description='lat/long location coordinates.') class GoogleCloudVisionV1p2beta1Product(BaseModel): description: Optional[str] = Field( None, description='User-provided metadata to be stored with this product. Must be at most 4096 characters long.', ) displayName: Optional[str] = Field( None, description='The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.', ) name: Optional[str] = Field( None, description='The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.', ) productCategory: Optional[str] = Field( None, description='Immutable. The category for the product identified by the reference image. This should be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products.', ) productLabels: Optional[List[GoogleCloudVisionV1p2beta1ProductKeyValue]] = Field( None, description='Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. "1199". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.', ) class GoogleCloudVisionV1p2beta1ProductSearchResultsResult(BaseModel): image: Optional[str] = Field( None, description='The resource name of the image from the product that is the closest match to the query.', ) product: Optional[GoogleCloudVisionV1p2beta1Product] = Field( None, description='The Product.' ) score: Optional[float] = Field( None, description='A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).', ) class GoogleCloudVisionV1p2beta1Symbol(BaseModel): boundingBox: Optional[GoogleCloudVisionV1p2beta1BoundingPoly] = Field( None, description="The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the symbol. Range [0, 1].' ) property: Optional[GoogleCloudVisionV1p2beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the symbol.' ) text: Optional[str] = Field( None, description='The actual UTF-8 representation of the symbol.' ) class GoogleCloudVisionV1p2beta1WebDetection(BaseModel): bestGuessLabels: Optional[List[GoogleCloudVisionV1p2beta1WebDetectionWebLabel]] = ( Field( None, description="The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", ) ) fullMatchingImages: Optional[ List[GoogleCloudVisionV1p2beta1WebDetectionWebImage] ] = Field( None, description='Fully matching images from the Internet. Can include resized copies of the query image.', ) pagesWithMatchingImages: Optional[ List[GoogleCloudVisionV1p2beta1WebDetectionWebPage] ] = Field( None, description='Web pages containing the matching images from the Internet.' ) partialMatchingImages: Optional[ List[GoogleCloudVisionV1p2beta1WebDetectionWebImage] ] = Field( None, description='Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.', ) visuallySimilarImages: Optional[ List[GoogleCloudVisionV1p2beta1WebDetectionWebImage] ] = Field(None, description='The visually similar image results.') webEntities: Optional[List[GoogleCloudVisionV1p2beta1WebDetectionWebEntity]] = ( Field(None, description='Deduced entities from similar images on the Internet.') ) class GoogleCloudVisionV1p2beta1Word(BaseModel): boundingBox: Optional[GoogleCloudVisionV1p2beta1BoundingPoly] = Field( None, description="The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the word. Range [0, 1].' ) property: Optional[GoogleCloudVisionV1p2beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the word.' ) symbols: Optional[List[GoogleCloudVisionV1p2beta1Symbol]] = Field( None, description='List of symbols in the word. The order of the symbols follows the natural reading order.', ) class GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse(BaseModel): outputConfig: Optional[GoogleCloudVisionV1p3beta1OutputConfig] = Field( None, description='The output location and metadata from AsyncAnnotateFileRequest.', ) class GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse(BaseModel): responses: Optional[List[GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse]] = ( Field( None, description='The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.', ) ) class GoogleCloudVisionV1p3beta1BoundingPoly(BaseModel): normalizedVertices: Optional[List[GoogleCloudVisionV1p3beta1NormalizedVertex]] = ( Field(None, description='The bounding polygon normalized vertices.') ) vertices: Optional[List[GoogleCloudVisionV1p3beta1Vertex]] = Field( None, description='The bounding polygon vertices.' ) class GoogleCloudVisionV1p3beta1CropHint(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p3beta1BoundingPoly] = Field( None, description="The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale.", ) confidence: Optional[float] = Field( None, description='Confidence of this being a salient region. Range [0, 1].' ) importanceFraction: Optional[float] = Field( None, description='Fraction of importance of this salient region with respect to the original image.', ) class GoogleCloudVisionV1p3beta1CropHintsAnnotation(BaseModel): cropHints: Optional[List[GoogleCloudVisionV1p3beta1CropHint]] = Field( None, description='Crop hint results.' ) class GoogleCloudVisionV1p3beta1FaceAnnotationLandmark(BaseModel): position: Optional[GoogleCloudVisionV1p3beta1Position] = Field( None, description='Face landmark position.' ) type: Optional[Type6] = Field(None, description='Face landmark type.') class GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p3beta1BoundingPoly] = Field( None, description='Image region to which this object belongs. This must be populated.', ) languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) mid: Optional[str] = Field( None, description='Object ID that should align with EntityAnnotation mid.' ) name: Optional[str] = Field( None, description='Object name, expressed in its `language_code` language.' ) score: Optional[float] = Field( None, description='Score of the result. Range [0, 1].' ) class GoogleCloudVisionV1p3beta1LocationInfo(BaseModel): latLng: Optional[LatLng] = Field(None, description='lat/long location coordinates.') class GoogleCloudVisionV1p3beta1Product(BaseModel): description: Optional[str] = Field( None, description='User-provided metadata to be stored with this product. Must be at most 4096 characters long.', ) displayName: Optional[str] = Field( None, description='The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.', ) name: Optional[str] = Field( None, description='The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.', ) productCategory: Optional[str] = Field( None, description='Immutable. The category for the product identified by the reference image. This should be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products.', ) productLabels: Optional[List[GoogleCloudVisionV1p3beta1ProductKeyValue]] = Field( None, description='Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. "1199". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.', ) class GoogleCloudVisionV1p3beta1ProductSearchResultsResult(BaseModel): image: Optional[str] = Field( None, description='The resource name of the image from the product that is the closest match to the query.', ) product: Optional[GoogleCloudVisionV1p3beta1Product] = Field( None, description='The Product.' ) score: Optional[float] = Field( None, description='A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).', ) class GoogleCloudVisionV1p3beta1ReferenceImage(BaseModel): boundingPolys: Optional[List[GoogleCloudVisionV1p3beta1BoundingPoly]] = Field( None, description='Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).', ) name: Optional[str] = Field( None, description='The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image.', ) uri: Optional[str] = Field( None, description='Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.', ) class GoogleCloudVisionV1p3beta1Symbol(BaseModel): boundingBox: Optional[GoogleCloudVisionV1p3beta1BoundingPoly] = Field( None, description="The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the symbol. Range [0, 1].' ) property: Optional[GoogleCloudVisionV1p3beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the symbol.' ) text: Optional[str] = Field( None, description='The actual UTF-8 representation of the symbol.' ) class GoogleCloudVisionV1p3beta1WebDetection(BaseModel): bestGuessLabels: Optional[List[GoogleCloudVisionV1p3beta1WebDetectionWebLabel]] = ( Field( None, description="The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", ) ) fullMatchingImages: Optional[ List[GoogleCloudVisionV1p3beta1WebDetectionWebImage] ] = Field( None, description='Fully matching images from the Internet. Can include resized copies of the query image.', ) pagesWithMatchingImages: Optional[ List[GoogleCloudVisionV1p3beta1WebDetectionWebPage] ] = Field( None, description='Web pages containing the matching images from the Internet.' ) partialMatchingImages: Optional[ List[GoogleCloudVisionV1p3beta1WebDetectionWebImage] ] = Field( None, description='Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.', ) visuallySimilarImages: Optional[ List[GoogleCloudVisionV1p3beta1WebDetectionWebImage] ] = Field(None, description='The visually similar image results.') webEntities: Optional[List[GoogleCloudVisionV1p3beta1WebDetectionWebEntity]] = ( Field(None, description='Deduced entities from similar images on the Internet.') ) class GoogleCloudVisionV1p3beta1Word(BaseModel): boundingBox: Optional[GoogleCloudVisionV1p3beta1BoundingPoly] = Field( None, description="The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the word. Range [0, 1].' ) property: Optional[GoogleCloudVisionV1p3beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the word.' ) symbols: Optional[List[GoogleCloudVisionV1p3beta1Symbol]] = Field( None, description='List of symbols in the word. The order of the symbols follows the natural reading order.', ) class GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse(BaseModel): outputConfig: Optional[GoogleCloudVisionV1p4beta1OutputConfig] = Field( None, description='The output location and metadata from AsyncAnnotateFileRequest.', ) class GoogleCloudVisionV1p4beta1AsyncBatchAnnotateFilesResponse(BaseModel): responses: Optional[List[GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse]] = ( Field( None, description='The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.', ) ) class GoogleCloudVisionV1p4beta1AsyncBatchAnnotateImagesResponse(BaseModel): outputConfig: Optional[GoogleCloudVisionV1p4beta1OutputConfig] = Field( None, description='The output location and metadata from AsyncBatchAnnotateImagesRequest.', ) class GoogleCloudVisionV1p4beta1BoundingPoly(BaseModel): normalizedVertices: Optional[List[GoogleCloudVisionV1p4beta1NormalizedVertex]] = ( Field(None, description='The bounding polygon normalized vertices.') ) vertices: Optional[List[GoogleCloudVisionV1p4beta1Vertex]] = Field( None, description='The bounding polygon vertices.' ) class GoogleCloudVisionV1p4beta1CropHint(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p4beta1BoundingPoly] = Field( None, description="The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale.", ) confidence: Optional[float] = Field( None, description='Confidence of this being a salient region. Range [0, 1].' ) importanceFraction: Optional[float] = Field( None, description='Fraction of importance of this salient region with respect to the original image.', ) class GoogleCloudVisionV1p4beta1CropHintsAnnotation(BaseModel): cropHints: Optional[List[GoogleCloudVisionV1p4beta1CropHint]] = Field( None, description='Crop hint results.' ) class GoogleCloudVisionV1p4beta1FaceAnnotationLandmark(BaseModel): position: Optional[GoogleCloudVisionV1p4beta1Position] = Field( None, description='Face landmark position.' ) type: Optional[Type8] = Field(None, description='Face landmark type.') class GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p4beta1BoundingPoly] = Field( None, description='Image region to which this object belongs. This must be populated.', ) languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) mid: Optional[str] = Field( None, description='Object ID that should align with EntityAnnotation mid.' ) name: Optional[str] = Field( None, description='Object name, expressed in its `language_code` language.' ) score: Optional[float] = Field( None, description='Score of the result. Range [0, 1].' ) class GoogleCloudVisionV1p4beta1LocationInfo(BaseModel): latLng: Optional[LatLng] = Field(None, description='lat/long location coordinates.') class GoogleCloudVisionV1p4beta1Product(BaseModel): description: Optional[str] = Field( None, description='User-provided metadata to be stored with this product. Must be at most 4096 characters long.', ) displayName: Optional[str] = Field( None, description='The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.', ) name: Optional[str] = Field( None, description='The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.', ) productCategory: Optional[str] = Field( None, description='Immutable. The category for the product identified by the reference image. This should be one of "homegoods-v2", "apparel-v2", "toys-v2", "packagedgoods-v1" or "general-v1". The legacy categories "homegoods", "apparel", and "toys" are still supported, but these should not be used for new products.', ) productLabels: Optional[List[GoogleCloudVisionV1p4beta1ProductKeyValue]] = Field( None, description='Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. "1199". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.', ) class GoogleCloudVisionV1p4beta1ProductSearchResultsResult(BaseModel): image: Optional[str] = Field( None, description='The resource name of the image from the product that is the closest match to the query.', ) product: Optional[GoogleCloudVisionV1p4beta1Product] = Field( None, description='The Product.' ) score: Optional[float] = Field( None, description='A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).', ) class GoogleCloudVisionV1p4beta1ReferenceImage(BaseModel): boundingPolys: Optional[List[GoogleCloudVisionV1p4beta1BoundingPoly]] = Field( None, description='Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).', ) name: Optional[str] = Field( None, description='The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image.', ) uri: Optional[str] = Field( None, description='Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.', ) class GoogleCloudVisionV1p4beta1Symbol(BaseModel): boundingBox: Optional[GoogleCloudVisionV1p4beta1BoundingPoly] = Field( None, description="The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the symbol. Range [0, 1].' ) property: Optional[GoogleCloudVisionV1p4beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the symbol.' ) text: Optional[str] = Field( None, description='The actual UTF-8 representation of the symbol.' ) class GoogleCloudVisionV1p4beta1WebDetection(BaseModel): bestGuessLabels: Optional[List[GoogleCloudVisionV1p4beta1WebDetectionWebLabel]] = ( Field( None, description="The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", ) ) fullMatchingImages: Optional[ List[GoogleCloudVisionV1p4beta1WebDetectionWebImage] ] = Field( None, description='Fully matching images from the Internet. Can include resized copies of the query image.', ) pagesWithMatchingImages: Optional[ List[GoogleCloudVisionV1p4beta1WebDetectionWebPage] ] = Field( None, description='Web pages containing the matching images from the Internet.' ) partialMatchingImages: Optional[ List[GoogleCloudVisionV1p4beta1WebDetectionWebImage] ] = Field( None, description='Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.', ) visuallySimilarImages: Optional[ List[GoogleCloudVisionV1p4beta1WebDetectionWebImage] ] = Field(None, description='The visually similar image results.') webEntities: Optional[List[GoogleCloudVisionV1p4beta1WebDetectionWebEntity]] = ( Field(None, description='Deduced entities from similar images on the Internet.') ) class GoogleCloudVisionV1p4beta1Word(BaseModel): boundingBox: Optional[GoogleCloudVisionV1p4beta1BoundingPoly] = Field( None, description="The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the word. Range [0, 1].' ) property: Optional[GoogleCloudVisionV1p4beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the word.' ) symbols: Optional[List[GoogleCloudVisionV1p4beta1Symbol]] = Field( None, description='List of symbols in the word. The order of the symbols follows the natural reading order.', ) class GroupedResult(BaseModel): boundingPoly: Optional[BoundingPoly] = Field( None, description='The bounding polygon around the product detected in the query image.', ) objectAnnotations: Optional[List[ObjectAnnotation]] = Field( None, description='List of generic predictions for the object in the bounding box.', ) results: Optional[List[Result]] = Field( None, description='List of results, one for each product match.' ) class Landmark(BaseModel): position: Optional[Position] = Field(None, description='Face landmark position.') type: Optional[Type10] = Field(None, description='Face landmark type.') class LocalizedObjectAnnotation(BaseModel): boundingPoly: Optional[BoundingPoly] = Field( None, description='Image region to which this object belongs. This must be populated.', ) languageCode: Optional[str] = Field( None, description='The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.', ) mid: Optional[str] = Field( None, description='Object ID that should align with EntityAnnotation mid.' ) name: Optional[str] = Field( None, description='Object name, expressed in its `language_code` language.' ) score: Optional[float] = Field( None, description='Score of the result. Range [0, 1].' ) class Operation(BaseModel): done: Optional[bool] = Field( None, description='If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.', ) error: Optional[Status] = Field( None, description='The error result of the operation in case of failure or cancellation.', ) metadata: Optional[Dict[str, Any]] = Field( None, description='Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.', ) name: Optional[str] = Field( None, description='The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.', ) response: Optional[Dict[str, Any]] = Field( None, description='The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.', ) class ProductSearchResults(BaseModel): indexTime: Optional[str] = Field( None, description='Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.', ) productGroupedResults: Optional[List[GroupedResult]] = Field( None, description='List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.', ) results: Optional[List[Result]] = Field( None, description='List of results, one for each product match.' ) class ReferenceImage(BaseModel): boundingPolys: Optional[List[BoundingPoly]] = Field( None, description='Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).', ) name: Optional[str] = Field( None, description='The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image.', ) uri: Optional[str] = Field( None, description='Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.', ) class Symbol(BaseModel): boundingBox: Optional[BoundingPoly] = Field( None, description="The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the symbol. Range [0, 1].' ) property: Optional[TextProperty] = Field( None, description='Additional information detected for the symbol.' ) text: Optional[str] = Field( None, description='The actual UTF-8 representation of the symbol.' ) class WebDetection(BaseModel): bestGuessLabels: Optional[List[WebLabel]] = Field( None, description="The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", ) fullMatchingImages: Optional[List[WebImage]] = Field( None, description='Fully matching images from the Internet. Can include resized copies of the query image.', ) pagesWithMatchingImages: Optional[List[WebPage]] = Field( None, description='Web pages containing the matching images from the Internet.' ) partialMatchingImages: Optional[List[WebImage]] = Field( None, description='Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.', ) visuallySimilarImages: Optional[List[WebImage]] = Field( None, description='The visually similar image results.' ) webEntities: Optional[List[WebEntity]] = Field( None, description='Deduced entities from similar images on the Internet.' ) class Word(BaseModel): boundingBox: Optional[BoundingPoly] = Field( None, description="The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the word. Range [0, 1].' ) property: Optional[TextProperty] = Field( None, description='Additional information detected for the word.' ) symbols: Optional[List[Symbol]] = Field( None, description='List of symbols in the word. The order of the symbols follows the natural reading order.', ) class FaceAnnotation(BaseModel): angerLikelihood: Optional[AngerLikelihood] = Field( None, description='Anger likelihood.' ) blurredLikelihood: Optional[BlurredLikelihood] = Field( None, description='Blurred likelihood.' ) boundingPoly: Optional[BoundingPoly] = Field( None, description='The bounding polygon around the face. The coordinates of the bounding box are in the original image\'s scale. The bounding box is computed to "frame" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated.', ) detectionConfidence: Optional[float] = Field( None, description='Detection confidence. Range [0, 1].' ) fdBoundingPoly: Optional[BoundingPoly] = Field( None, description='The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the "amount of skin" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix.', ) headwearLikelihood: Optional[HeadwearLikelihood] = Field( None, description='Headwear likelihood.' ) joyLikelihood: Optional[JoyLikelihood] = Field(None, description='Joy likelihood.') landmarkingConfidence: Optional[float] = Field( None, description='Face landmarking confidence. Range [0, 1].' ) landmarks: Optional[List[Landmark]] = Field( None, description='Detected face landmarks.' ) panAngle: Optional[float] = Field( None, description='Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].', ) rollAngle: Optional[float] = Field( None, description='Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].', ) sorrowLikelihood: Optional[SorrowLikelihood] = Field( None, description='Sorrow likelihood.' ) surpriseLikelihood: Optional[SurpriseLikelihood] = Field( None, description='Surprise likelihood.' ) tiltAngle: Optional[float] = Field( None, description="Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", ) underExposedLikelihood: Optional[UnderExposedLikelihood] = Field( None, description='Under-exposed likelihood.' ) class GoogleCloudVisionV1p1beta1EntityAnnotation(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p1beta1BoundingPoly] = Field( None, description='Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features.', ) confidence: Optional[float] = Field( None, description='**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].', ) description: Optional[str] = Field( None, description='Entity textual description, expressed in its `locale` language.', ) locale: Optional[str] = Field( None, description='The language code for the locale in which the entity textual `description` is expressed.', ) locations: Optional[List[GoogleCloudVisionV1p1beta1LocationInfo]] = Field( None, description='The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.', ) mid: Optional[str] = Field( None, description='Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).', ) properties: Optional[List[GoogleCloudVisionV1p1beta1Property]] = Field( None, description='Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.', ) score: Optional[float] = Field( None, description='Overall score of the result. Range [0, 1].' ) topicality: Optional[float] = Field( None, description='The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].', ) class GoogleCloudVisionV1p1beta1FaceAnnotation(BaseModel): angerLikelihood: Optional[AngerLikelihood] = Field( None, description='Anger likelihood.' ) blurredLikelihood: Optional[BlurredLikelihood] = Field( None, description='Blurred likelihood.' ) boundingPoly: Optional[GoogleCloudVisionV1p1beta1BoundingPoly] = Field( None, description='The bounding polygon around the face. The coordinates of the bounding box are in the original image\'s scale. The bounding box is computed to "frame" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated.', ) detectionConfidence: Optional[float] = Field( None, description='Detection confidence. Range [0, 1].' ) fdBoundingPoly: Optional[GoogleCloudVisionV1p1beta1BoundingPoly] = Field( None, description='The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the "amount of skin" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix.', ) headwearLikelihood: Optional[HeadwearLikelihood] = Field( None, description='Headwear likelihood.' ) joyLikelihood: Optional[JoyLikelihood] = Field(None, description='Joy likelihood.') landmarkingConfidence: Optional[float] = Field( None, description='Face landmarking confidence. Range [0, 1].' ) landmarks: Optional[List[GoogleCloudVisionV1p1beta1FaceAnnotationLandmark]] = Field( None, description='Detected face landmarks.' ) panAngle: Optional[float] = Field( None, description='Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].', ) rollAngle: Optional[float] = Field( None, description='Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].', ) sorrowLikelihood: Optional[SorrowLikelihood] = Field( None, description='Sorrow likelihood.' ) surpriseLikelihood: Optional[SurpriseLikelihood] = Field( None, description='Surprise likelihood.' ) tiltAngle: Optional[float] = Field( None, description="Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", ) underExposedLikelihood: Optional[UnderExposedLikelihood] = Field( None, description='Under-exposed likelihood.' ) class GoogleCloudVisionV1p1beta1ImageContext(BaseModel): cropHintsParams: Optional[GoogleCloudVisionV1p1beta1CropHintsParams] = Field( None, description='Parameters for crop hints annotation request.' ) languageHints: Optional[List[str]] = Field( None, description='List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).', ) latLongRect: Optional[GoogleCloudVisionV1p1beta1LatLongRect] = Field( None, description='Not used.' ) productSearchParams: Optional[GoogleCloudVisionV1p1beta1ProductSearchParams] = ( Field(None, description='Parameters for product search.') ) textDetectionParams: Optional[GoogleCloudVisionV1p1beta1TextDetectionParams] = ( Field( None, description='Parameters for text detection and document text detection.', ) ) webDetectionParams: Optional[GoogleCloudVisionV1p1beta1WebDetectionParams] = Field( None, description='Parameters for web detection.' ) class GoogleCloudVisionV1p1beta1Paragraph(BaseModel): boundingBox: Optional[GoogleCloudVisionV1p1beta1BoundingPoly] = Field( None, description="The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the paragraph. Range [0, 1].', ) property: Optional[GoogleCloudVisionV1p1beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the paragraph.' ) words: Optional[List[GoogleCloudVisionV1p1beta1Word]] = Field( None, description='List of all words in this paragraph.' ) class GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p1beta1BoundingPoly] = Field( None, description='The bounding polygon around the product detected in the query image.', ) objectAnnotations: Optional[ List[GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation] ] = Field( None, description='List of generic predictions for the object in the bounding box.', ) results: Optional[List[GoogleCloudVisionV1p1beta1ProductSearchResultsResult]] = ( Field(None, description='List of results, one for each product match.') ) class GoogleCloudVisionV1p2beta1EntityAnnotation(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p2beta1BoundingPoly] = Field( None, description='Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features.', ) confidence: Optional[float] = Field( None, description='**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].', ) description: Optional[str] = Field( None, description='Entity textual description, expressed in its `locale` language.', ) locale: Optional[str] = Field( None, description='The language code for the locale in which the entity textual `description` is expressed.', ) locations: Optional[List[GoogleCloudVisionV1p2beta1LocationInfo]] = Field( None, description='The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.', ) mid: Optional[str] = Field( None, description='Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).', ) properties: Optional[List[GoogleCloudVisionV1p2beta1Property]] = Field( None, description='Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.', ) score: Optional[float] = Field( None, description='Overall score of the result. Range [0, 1].' ) topicality: Optional[float] = Field( None, description='The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].', ) class GoogleCloudVisionV1p2beta1FaceAnnotation(BaseModel): angerLikelihood: Optional[AngerLikelihood] = Field( None, description='Anger likelihood.' ) blurredLikelihood: Optional[BlurredLikelihood] = Field( None, description='Blurred likelihood.' ) boundingPoly: Optional[GoogleCloudVisionV1p2beta1BoundingPoly] = Field( None, description='The bounding polygon around the face. The coordinates of the bounding box are in the original image\'s scale. The bounding box is computed to "frame" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated.', ) detectionConfidence: Optional[float] = Field( None, description='Detection confidence. Range [0, 1].' ) fdBoundingPoly: Optional[GoogleCloudVisionV1p2beta1BoundingPoly] = Field( None, description='The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the "amount of skin" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix.', ) headwearLikelihood: Optional[HeadwearLikelihood] = Field( None, description='Headwear likelihood.' ) joyLikelihood: Optional[JoyLikelihood] = Field(None, description='Joy likelihood.') landmarkingConfidence: Optional[float] = Field( None, description='Face landmarking confidence. Range [0, 1].' ) landmarks: Optional[List[GoogleCloudVisionV1p2beta1FaceAnnotationLandmark]] = Field( None, description='Detected face landmarks.' ) panAngle: Optional[float] = Field( None, description='Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].', ) rollAngle: Optional[float] = Field( None, description='Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].', ) sorrowLikelihood: Optional[SorrowLikelihood] = Field( None, description='Sorrow likelihood.' ) surpriseLikelihood: Optional[SurpriseLikelihood] = Field( None, description='Surprise likelihood.' ) tiltAngle: Optional[float] = Field( None, description="Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", ) underExposedLikelihood: Optional[UnderExposedLikelihood] = Field( None, description='Under-exposed likelihood.' ) class GoogleCloudVisionV1p2beta1Paragraph(BaseModel): boundingBox: Optional[GoogleCloudVisionV1p2beta1BoundingPoly] = Field( None, description="The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the paragraph. Range [0, 1].', ) property: Optional[GoogleCloudVisionV1p2beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the paragraph.' ) words: Optional[List[GoogleCloudVisionV1p2beta1Word]] = Field( None, description='List of all words in this paragraph.' ) class GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p2beta1BoundingPoly] = Field( None, description='The bounding polygon around the product detected in the query image.', ) objectAnnotations: Optional[ List[GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation] ] = Field( None, description='List of generic predictions for the object in the bounding box.', ) results: Optional[List[GoogleCloudVisionV1p2beta1ProductSearchResultsResult]] = ( Field(None, description='List of results, one for each product match.') ) class GoogleCloudVisionV1p3beta1EntityAnnotation(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p3beta1BoundingPoly] = Field( None, description='Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features.', ) confidence: Optional[float] = Field( None, description='**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].', ) description: Optional[str] = Field( None, description='Entity textual description, expressed in its `locale` language.', ) locale: Optional[str] = Field( None, description='The language code for the locale in which the entity textual `description` is expressed.', ) locations: Optional[List[GoogleCloudVisionV1p3beta1LocationInfo]] = Field( None, description='The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.', ) mid: Optional[str] = Field( None, description='Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).', ) properties: Optional[List[GoogleCloudVisionV1p3beta1Property]] = Field( None, description='Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.', ) score: Optional[float] = Field( None, description='Overall score of the result. Range [0, 1].' ) topicality: Optional[float] = Field( None, description='The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].', ) class GoogleCloudVisionV1p3beta1FaceAnnotation(BaseModel): angerLikelihood: Optional[AngerLikelihood] = Field( None, description='Anger likelihood.' ) blurredLikelihood: Optional[BlurredLikelihood] = Field( None, description='Blurred likelihood.' ) boundingPoly: Optional[GoogleCloudVisionV1p3beta1BoundingPoly] = Field( None, description='The bounding polygon around the face. The coordinates of the bounding box are in the original image\'s scale. The bounding box is computed to "frame" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated.', ) detectionConfidence: Optional[float] = Field( None, description='Detection confidence. Range [0, 1].' ) fdBoundingPoly: Optional[GoogleCloudVisionV1p3beta1BoundingPoly] = Field( None, description='The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the "amount of skin" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix.', ) headwearLikelihood: Optional[HeadwearLikelihood] = Field( None, description='Headwear likelihood.' ) joyLikelihood: Optional[JoyLikelihood] = Field(None, description='Joy likelihood.') landmarkingConfidence: Optional[float] = Field( None, description='Face landmarking confidence. Range [0, 1].' ) landmarks: Optional[List[GoogleCloudVisionV1p3beta1FaceAnnotationLandmark]] = Field( None, description='Detected face landmarks.' ) panAngle: Optional[float] = Field( None, description='Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].', ) rollAngle: Optional[float] = Field( None, description='Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].', ) sorrowLikelihood: Optional[SorrowLikelihood] = Field( None, description='Sorrow likelihood.' ) surpriseLikelihood: Optional[SurpriseLikelihood] = Field( None, description='Surprise likelihood.' ) tiltAngle: Optional[float] = Field( None, description="Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", ) underExposedLikelihood: Optional[UnderExposedLikelihood] = Field( None, description='Under-exposed likelihood.' ) class GoogleCloudVisionV1p3beta1ImportProductSetsResponse(BaseModel): referenceImages: Optional[List[GoogleCloudVisionV1p3beta1ReferenceImage]] = Field( None, description='The list of reference_images that are imported successfully.' ) statuses: Optional[List[Status]] = Field( None, description='The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.', ) class GoogleCloudVisionV1p3beta1Paragraph(BaseModel): boundingBox: Optional[GoogleCloudVisionV1p3beta1BoundingPoly] = Field( None, description="The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the paragraph. Range [0, 1].', ) property: Optional[GoogleCloudVisionV1p3beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the paragraph.' ) words: Optional[List[GoogleCloudVisionV1p3beta1Word]] = Field( None, description='List of all words in this paragraph.' ) class GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p3beta1BoundingPoly] = Field( None, description='The bounding polygon around the product detected in the query image.', ) objectAnnotations: Optional[ List[GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation] ] = Field( None, description='List of generic predictions for the object in the bounding box.', ) results: Optional[List[GoogleCloudVisionV1p3beta1ProductSearchResultsResult]] = ( Field(None, description='List of results, one for each product match.') ) class GoogleCloudVisionV1p4beta1EntityAnnotation(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p4beta1BoundingPoly] = Field( None, description='Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features.', ) confidence: Optional[float] = Field( None, description='**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the "Eiffel Tower" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].', ) description: Optional[str] = Field( None, description='Entity textual description, expressed in its `locale` language.', ) locale: Optional[str] = Field( None, description='The language code for the locale in which the entity textual `description` is expressed.', ) locations: Optional[List[GoogleCloudVisionV1p4beta1LocationInfo]] = Field( None, description='The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.', ) mid: Optional[str] = Field( None, description='Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).', ) properties: Optional[List[GoogleCloudVisionV1p4beta1Property]] = Field( None, description='Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.', ) score: Optional[float] = Field( None, description='Overall score of the result. Range [0, 1].' ) topicality: Optional[float] = Field( None, description='The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of "tower" is likely higher to an image containing the detected "Eiffel Tower" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].', ) class GoogleCloudVisionV1p4beta1FaceAnnotation(BaseModel): angerLikelihood: Optional[AngerLikelihood] = Field( None, description='Anger likelihood.' ) blurredLikelihood: Optional[BlurredLikelihood] = Field( None, description='Blurred likelihood.' ) boundingPoly: Optional[GoogleCloudVisionV1p4beta1BoundingPoly] = Field( None, description='The bounding polygon around the face. The coordinates of the bounding box are in the original image\'s scale. The bounding box is computed to "frame" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated.', ) detectionConfidence: Optional[float] = Field( None, description='Detection confidence. Range [0, 1].' ) fdBoundingPoly: Optional[GoogleCloudVisionV1p4beta1BoundingPoly] = Field( None, description='The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the "amount of skin" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix.', ) headwearLikelihood: Optional[HeadwearLikelihood] = Field( None, description='Headwear likelihood.' ) joyLikelihood: Optional[JoyLikelihood] = Field(None, description='Joy likelihood.') landmarkingConfidence: Optional[float] = Field( None, description='Face landmarking confidence. Range [0, 1].' ) landmarks: Optional[List[GoogleCloudVisionV1p4beta1FaceAnnotationLandmark]] = Field( None, description='Detected face landmarks.' ) panAngle: Optional[float] = Field( None, description='Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].', ) recognitionResult: Optional[ List[GoogleCloudVisionV1p4beta1FaceRecognitionResult] ] = Field( None, description='Additional recognition information. Only computed if image_context.face_recognition_params is provided, **and** a match is found to a Celebrity in the input CelebritySet. This field is sorted in order of decreasing confidence values.', ) rollAngle: Optional[float] = Field( None, description='Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].', ) sorrowLikelihood: Optional[SorrowLikelihood] = Field( None, description='Sorrow likelihood.' ) surpriseLikelihood: Optional[SurpriseLikelihood] = Field( None, description='Surprise likelihood.' ) tiltAngle: Optional[float] = Field( None, description="Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", ) underExposedLikelihood: Optional[UnderExposedLikelihood] = Field( None, description='Under-exposed likelihood.' ) class GoogleCloudVisionV1p4beta1ImportProductSetsResponse(BaseModel): referenceImages: Optional[List[GoogleCloudVisionV1p4beta1ReferenceImage]] = Field( None, description='The list of reference_images that are imported successfully.' ) statuses: Optional[List[Status]] = Field( None, description='The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.', ) class GoogleCloudVisionV1p4beta1Paragraph(BaseModel): boundingBox: Optional[GoogleCloudVisionV1p4beta1BoundingPoly] = Field( None, description="The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the paragraph. Range [0, 1].', ) property: Optional[GoogleCloudVisionV1p4beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the paragraph.' ) words: Optional[List[GoogleCloudVisionV1p4beta1Word]] = Field( None, description='List of all words in this paragraph.' ) class GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult(BaseModel): boundingPoly: Optional[GoogleCloudVisionV1p4beta1BoundingPoly] = Field( None, description='The bounding polygon around the product detected in the query image.', ) objectAnnotations: Optional[ List[GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation] ] = Field( None, description='List of generic predictions for the object in the bounding box.', ) results: Optional[List[GoogleCloudVisionV1p4beta1ProductSearchResultsResult]] = ( Field(None, description='List of results, one for each product match.') ) class ImportProductSetsResponse(BaseModel): referenceImages: Optional[List[ReferenceImage]] = Field( None, description='The list of reference_images that are imported successfully.' ) statuses: Optional[List[Status]] = Field( None, description='The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.', ) class Paragraph(BaseModel): boundingBox: Optional[BoundingPoly] = Field( None, description="The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results for the paragraph. Range [0, 1].', ) property: Optional[TextProperty] = Field( None, description='Additional information detected for the paragraph.' ) words: Optional[List[Word]] = Field( None, description='List of all words in this paragraph.' ) class Block(BaseModel): blockType: Optional[BlockType] = Field( None, description='Detected block type (text, image etc) for this block.' ) boundingBox: Optional[BoundingPoly] = Field( None, description="The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results on the block. Range [0, 1].' ) paragraphs: Optional[List[Paragraph]] = Field( None, description='List of paragraphs in this block (if this blocks is of type text).', ) property: Optional[TextProperty] = Field( None, description='Additional information detected for the block.' ) class GoogleCloudVisionV1p1beta1AnnotateFileRequest(BaseModel): features: Optional[List[GoogleCloudVisionV1p1beta1Feature]] = Field( None, description='Required. Requested features.' ) imageContext: Optional[GoogleCloudVisionV1p1beta1ImageContext] = Field( None, description='Additional context that may accompany the image(s) in the file.', ) inputConfig: Optional[GoogleCloudVisionV1p1beta1InputConfig] = Field( None, description='Required. Information about the input file.' ) pages: Optional[List[int]] = Field( None, description='Pages of the file to perform image annotation. Pages starts from 1, we assume the first page of the file is page 1. At most 5 pages are supported per request. Pages can be negative. Page 1 means the first page. Page 2 means the second page. Page -1 means the last page. Page -2 means the second to the last page. If the file is GIF instead of PDF or TIFF, page refers to GIF frames. If this field is empty, by default the service performs image annotation for the first 5 pages of the file.', ) class GoogleCloudVisionV1p1beta1AnnotateImageRequest(BaseModel): features: Optional[List[GoogleCloudVisionV1p1beta1Feature]] = Field( None, description='Requested features.' ) image: Optional[GoogleCloudVisionV1p1beta1Image] = Field( None, description='The image to be processed.' ) imageContext: Optional[GoogleCloudVisionV1p1beta1ImageContext] = Field( None, description='Additional context that may accompany the image.' ) class GoogleCloudVisionV1p1beta1AsyncAnnotateFileRequest(BaseModel): features: Optional[List[GoogleCloudVisionV1p1beta1Feature]] = Field( None, description='Required. Requested features.' ) imageContext: Optional[GoogleCloudVisionV1p1beta1ImageContext] = Field( None, description='Additional context that may accompany the image(s) in the file.', ) inputConfig: Optional[GoogleCloudVisionV1p1beta1InputConfig] = Field( None, description='Required. Information about the input file.' ) outputConfig: Optional[GoogleCloudVisionV1p1beta1OutputConfig] = Field( None, description='Required. The desired output location and metadata (e.g. format).', ) class GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest(BaseModel): parent: Optional[str] = Field( None, description='Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.', ) requests: Optional[List[GoogleCloudVisionV1p1beta1AsyncAnnotateFileRequest]] = ( Field( None, description='Required. Individual async file annotation requests for this batch.', ) ) class GoogleCloudVisionV1p1beta1AsyncBatchAnnotateImagesRequest(BaseModel): outputConfig: Optional[GoogleCloudVisionV1p1beta1OutputConfig] = Field( None, description='Required. The desired output location and metadata (e.g. format).', ) parent: Optional[str] = Field( None, description='Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.', ) requests: Optional[List[GoogleCloudVisionV1p1beta1AnnotateImageRequest]] = Field( None, description='Required. Individual image annotation requests for this batch.', ) class GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest(BaseModel): parent: Optional[str] = Field( None, description='Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.', ) requests: Optional[List[GoogleCloudVisionV1p1beta1AnnotateFileRequest]] = Field( None, description='Required. The list of file annotation requests. Right now we support only one AnnotateFileRequest in BatchAnnotateFilesRequest.', ) class GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest(BaseModel): parent: Optional[str] = Field( None, description='Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.', ) requests: Optional[List[GoogleCloudVisionV1p1beta1AnnotateImageRequest]] = Field( None, description='Required. Individual image annotation requests for this batch.', ) class GoogleCloudVisionV1p1beta1Block(BaseModel): blockType: Optional[BlockType] = Field( None, description='Detected block type (text, image etc) for this block.' ) boundingBox: Optional[GoogleCloudVisionV1p1beta1BoundingPoly] = Field( None, description="The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results on the block. Range [0, 1].' ) paragraphs: Optional[List[GoogleCloudVisionV1p1beta1Paragraph]] = Field( None, description='List of paragraphs in this block (if this blocks is of type text).', ) property: Optional[GoogleCloudVisionV1p1beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the block.' ) class GoogleCloudVisionV1p1beta1Page(BaseModel): blocks: Optional[List[GoogleCloudVisionV1p1beta1Block]] = Field( None, description='List of blocks of text, images etc on this page.' ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results on the page. Range [0, 1].' ) height: Optional[int] = Field( None, description='Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.', ) property: Optional[GoogleCloudVisionV1p1beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected on the page.' ) width: Optional[int] = Field( None, description='Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.', ) class GoogleCloudVisionV1p1beta1ProductSearchResults(BaseModel): indexTime: Optional[str] = Field( None, description='Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.', ) productGroupedResults: Optional[ List[GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult] ] = Field( None, description='List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.', ) results: Optional[List[GoogleCloudVisionV1p1beta1ProductSearchResultsResult]] = ( Field(None, description='List of results, one for each product match.') ) class GoogleCloudVisionV1p1beta1TextAnnotation(BaseModel): pages: Optional[List[GoogleCloudVisionV1p1beta1Page]] = Field( None, description='List of pages detected by OCR.' ) text: Optional[str] = Field(None, description='UTF-8 text detected on the pages.') class GoogleCloudVisionV1p2beta1Block(BaseModel): blockType: Optional[BlockType] = Field( None, description='Detected block type (text, image etc) for this block.' ) boundingBox: Optional[GoogleCloudVisionV1p2beta1BoundingPoly] = Field( None, description="The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results on the block. Range [0, 1].' ) paragraphs: Optional[List[GoogleCloudVisionV1p2beta1Paragraph]] = Field( None, description='List of paragraphs in this block (if this blocks is of type text).', ) property: Optional[GoogleCloudVisionV1p2beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the block.' ) class GoogleCloudVisionV1p2beta1Page(BaseModel): blocks: Optional[List[GoogleCloudVisionV1p2beta1Block]] = Field( None, description='List of blocks of text, images etc on this page.' ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results on the page. Range [0, 1].' ) height: Optional[int] = Field( None, description='Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.', ) property: Optional[GoogleCloudVisionV1p2beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected on the page.' ) width: Optional[int] = Field( None, description='Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.', ) class GoogleCloudVisionV1p2beta1ProductSearchResults(BaseModel): indexTime: Optional[str] = Field( None, description='Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.', ) productGroupedResults: Optional[ List[GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult] ] = Field( None, description='List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.', ) results: Optional[List[GoogleCloudVisionV1p2beta1ProductSearchResultsResult]] = ( Field(None, description='List of results, one for each product match.') ) class GoogleCloudVisionV1p2beta1TextAnnotation(BaseModel): pages: Optional[List[GoogleCloudVisionV1p2beta1Page]] = Field( None, description='List of pages detected by OCR.' ) text: Optional[str] = Field(None, description='UTF-8 text detected on the pages.') class GoogleCloudVisionV1p3beta1Block(BaseModel): blockType: Optional[BlockType] = Field( None, description='Detected block type (text, image etc) for this block.' ) boundingBox: Optional[GoogleCloudVisionV1p3beta1BoundingPoly] = Field( None, description="The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results on the block. Range [0, 1].' ) paragraphs: Optional[List[GoogleCloudVisionV1p3beta1Paragraph]] = Field( None, description='List of paragraphs in this block (if this blocks is of type text).', ) property: Optional[GoogleCloudVisionV1p3beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the block.' ) class GoogleCloudVisionV1p3beta1Page(BaseModel): blocks: Optional[List[GoogleCloudVisionV1p3beta1Block]] = Field( None, description='List of blocks of text, images etc on this page.' ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results on the page. Range [0, 1].' ) height: Optional[int] = Field( None, description='Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.', ) property: Optional[GoogleCloudVisionV1p3beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected on the page.' ) width: Optional[int] = Field( None, description='Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.', ) class GoogleCloudVisionV1p3beta1ProductSearchResults(BaseModel): indexTime: Optional[str] = Field( None, description='Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.', ) productGroupedResults: Optional[ List[GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult] ] = Field( None, description='List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.', ) results: Optional[List[GoogleCloudVisionV1p3beta1ProductSearchResultsResult]] = ( Field(None, description='List of results, one for each product match.') ) class GoogleCloudVisionV1p3beta1TextAnnotation(BaseModel): pages: Optional[List[GoogleCloudVisionV1p3beta1Page]] = Field( None, description='List of pages detected by OCR.' ) text: Optional[str] = Field(None, description='UTF-8 text detected on the pages.') class GoogleCloudVisionV1p4beta1Block(BaseModel): blockType: Optional[BlockType] = Field( None, description='Detected block type (text, image etc) for this block.' ) boundingBox: Optional[GoogleCloudVisionV1p4beta1BoundingPoly] = Field( None, description="The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3).", ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results on the block. Range [0, 1].' ) paragraphs: Optional[List[GoogleCloudVisionV1p4beta1Paragraph]] = Field( None, description='List of paragraphs in this block (if this blocks is of type text).', ) property: Optional[GoogleCloudVisionV1p4beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected for the block.' ) class GoogleCloudVisionV1p4beta1Page(BaseModel): blocks: Optional[List[GoogleCloudVisionV1p4beta1Block]] = Field( None, description='List of blocks of text, images etc on this page.' ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results on the page. Range [0, 1].' ) height: Optional[int] = Field( None, description='Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.', ) property: Optional[GoogleCloudVisionV1p4beta1TextAnnotationTextProperty] = Field( None, description='Additional information detected on the page.' ) width: Optional[int] = Field( None, description='Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.', ) class GoogleCloudVisionV1p4beta1ProductSearchResults(BaseModel): indexTime: Optional[str] = Field( None, description='Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.', ) productGroupedResults: Optional[ List[GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult] ] = Field( None, description='List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.', ) results: Optional[List[GoogleCloudVisionV1p4beta1ProductSearchResultsResult]] = ( Field(None, description='List of results, one for each product match.') ) class GoogleCloudVisionV1p4beta1TextAnnotation(BaseModel): pages: Optional[List[GoogleCloudVisionV1p4beta1Page]] = Field( None, description='List of pages detected by OCR.' ) text: Optional[str] = Field(None, description='UTF-8 text detected on the pages.') class Page(BaseModel): blocks: Optional[List[Block]] = Field( None, description='List of blocks of text, images etc on this page.' ) confidence: Optional[float] = Field( None, description='Confidence of the OCR results on the page. Range [0, 1].' ) height: Optional[int] = Field( None, description='Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.', ) property: Optional[TextProperty] = Field( None, description='Additional information detected on the page.' ) width: Optional[int] = Field( None, description='Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.', ) class TextAnnotation(BaseModel): pages: Optional[List[Page]] = Field( None, description='List of pages detected by OCR.' ) text: Optional[str] = Field(None, description='UTF-8 text detected on the pages.') class AnnotateImageResponse(BaseModel): context: Optional[ImageAnnotationContext] = Field( None, description='If present, contextual information is needed to understand where this image comes from.', ) cropHintsAnnotation: Optional[CropHintsAnnotation] = Field( None, description='If present, crop hints have completed successfully.' ) error: Optional[Status] = Field( None, description='If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set.', ) faceAnnotations: Optional[List[FaceAnnotation]] = Field( None, description='If present, face detection has completed successfully.' ) fullTextAnnotation: Optional[TextAnnotation] = Field( None, description='If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text.', ) imagePropertiesAnnotation: Optional[ImageProperties] = Field( None, description='If present, image properties were extracted successfully.' ) labelAnnotations: Optional[List[EntityAnnotation]] = Field( None, description='If present, label detection has completed successfully.' ) landmarkAnnotations: Optional[List[EntityAnnotation]] = Field( None, description='If present, landmark detection has completed successfully.' ) localizedObjectAnnotations: Optional[List[LocalizedObjectAnnotation]] = Field( None, description='If present, localized object detection has completed successfully. This will be sorted descending by confidence score.', ) logoAnnotations: Optional[List[EntityAnnotation]] = Field( None, description='If present, logo detection has completed successfully.' ) productSearchResults: Optional[ProductSearchResults] = Field( None, description='If present, product search has completed successfully.' ) safeSearchAnnotation: Optional[SafeSearchAnnotation] = Field( None, description='If present, safe-search annotation has completed successfully.', ) textAnnotations: Optional[List[EntityAnnotation]] = Field( None, description='If present, text (OCR) detection has completed successfully.' ) webDetection: Optional[WebDetection] = Field( None, description='If present, web detection has completed successfully.' ) class GoogleCloudVisionV1p1beta1AnnotateImageResponse(BaseModel): context: Optional[GoogleCloudVisionV1p1beta1ImageAnnotationContext] = Field( None, description='If present, contextual information is needed to understand where this image comes from.', ) cropHintsAnnotation: Optional[GoogleCloudVisionV1p1beta1CropHintsAnnotation] = ( Field(None, description='If present, crop hints have completed successfully.') ) error: Optional[Status] = Field( None, description='If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set.', ) faceAnnotations: Optional[List[GoogleCloudVisionV1p1beta1FaceAnnotation]] = Field( None, description='If present, face detection has completed successfully.' ) fullTextAnnotation: Optional[GoogleCloudVisionV1p1beta1TextAnnotation] = Field( None, description='If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text.', ) imagePropertiesAnnotation: Optional[GoogleCloudVisionV1p1beta1ImageProperties] = ( Field( None, description='If present, image properties were extracted successfully.', ) ) labelAnnotations: Optional[List[GoogleCloudVisionV1p1beta1EntityAnnotation]] = ( Field( None, description='If present, label detection has completed successfully.' ) ) landmarkAnnotations: Optional[List[GoogleCloudVisionV1p1beta1EntityAnnotation]] = ( Field( None, description='If present, landmark detection has completed successfully.', ) ) localizedObjectAnnotations: Optional[ List[GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation] ] = Field( None, description='If present, localized object detection has completed successfully. This will be sorted descending by confidence score.', ) logoAnnotations: Optional[List[GoogleCloudVisionV1p1beta1EntityAnnotation]] = Field( None, description='If present, logo detection has completed successfully.' ) productSearchResults: Optional[GoogleCloudVisionV1p1beta1ProductSearchResults] = ( Field( None, description='If present, product search has completed successfully.' ) ) safeSearchAnnotation: Optional[GoogleCloudVisionV1p1beta1SafeSearchAnnotation] = ( Field( None, description='If present, safe-search annotation has completed successfully.', ) ) textAnnotations: Optional[List[GoogleCloudVisionV1p1beta1EntityAnnotation]] = Field( None, description='If present, text (OCR) detection has completed successfully.' ) webDetection: Optional[GoogleCloudVisionV1p1beta1WebDetection] = Field( None, description='If present, web detection has completed successfully.' ) class GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse(BaseModel): responses: Optional[List[GoogleCloudVisionV1p1beta1AnnotateImageResponse]] = Field( None, description='Individual responses to image annotation requests within the batch.', ) class GoogleCloudVisionV1p2beta1AnnotateImageResponse(BaseModel): context: Optional[GoogleCloudVisionV1p2beta1ImageAnnotationContext] = Field( None, description='If present, contextual information is needed to understand where this image comes from.', ) cropHintsAnnotation: Optional[GoogleCloudVisionV1p2beta1CropHintsAnnotation] = ( Field(None, description='If present, crop hints have completed successfully.') ) error: Optional[Status] = Field( None, description='If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set.', ) faceAnnotations: Optional[List[GoogleCloudVisionV1p2beta1FaceAnnotation]] = Field( None, description='If present, face detection has completed successfully.' ) fullTextAnnotation: Optional[GoogleCloudVisionV1p2beta1TextAnnotation] = Field( None, description='If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text.', ) imagePropertiesAnnotation: Optional[GoogleCloudVisionV1p2beta1ImageProperties] = ( Field( None, description='If present, image properties were extracted successfully.', ) ) labelAnnotations: Optional[List[GoogleCloudVisionV1p2beta1EntityAnnotation]] = ( Field( None, description='If present, label detection has completed successfully.' ) ) landmarkAnnotations: Optional[List[GoogleCloudVisionV1p2beta1EntityAnnotation]] = ( Field( None, description='If present, landmark detection has completed successfully.', ) ) localizedObjectAnnotations: Optional[ List[GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation] ] = Field( None, description='If present, localized object detection has completed successfully. This will be sorted descending by confidence score.', ) logoAnnotations: Optional[List[GoogleCloudVisionV1p2beta1EntityAnnotation]] = Field( None, description='If present, logo detection has completed successfully.' ) productSearchResults: Optional[GoogleCloudVisionV1p2beta1ProductSearchResults] = ( Field( None, description='If present, product search has completed successfully.' ) ) safeSearchAnnotation: Optional[GoogleCloudVisionV1p2beta1SafeSearchAnnotation] = ( Field( None, description='If present, safe-search annotation has completed successfully.', ) ) textAnnotations: Optional[List[GoogleCloudVisionV1p2beta1EntityAnnotation]] = Field( None, description='If present, text (OCR) detection has completed successfully.' ) webDetection: Optional[GoogleCloudVisionV1p2beta1WebDetection] = Field( None, description='If present, web detection has completed successfully.' ) class GoogleCloudVisionV1p3beta1AnnotateImageResponse(BaseModel): context: Optional[GoogleCloudVisionV1p3beta1ImageAnnotationContext] = Field( None, description='If present, contextual information is needed to understand where this image comes from.', ) cropHintsAnnotation: Optional[GoogleCloudVisionV1p3beta1CropHintsAnnotation] = ( Field(None, description='If present, crop hints have completed successfully.') ) error: Optional[Status] = Field( None, description='If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set.', ) faceAnnotations: Optional[List[GoogleCloudVisionV1p3beta1FaceAnnotation]] = Field( None, description='If present, face detection has completed successfully.' ) fullTextAnnotation: Optional[GoogleCloudVisionV1p3beta1TextAnnotation] = Field( None, description='If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text.', ) imagePropertiesAnnotation: Optional[GoogleCloudVisionV1p3beta1ImageProperties] = ( Field( None, description='If present, image properties were extracted successfully.', ) ) labelAnnotations: Optional[List[GoogleCloudVisionV1p3beta1EntityAnnotation]] = ( Field( None, description='If present, label detection has completed successfully.' ) ) landmarkAnnotations: Optional[List[GoogleCloudVisionV1p3beta1EntityAnnotation]] = ( Field( None, description='If present, landmark detection has completed successfully.', ) ) localizedObjectAnnotations: Optional[ List[GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation] ] = Field( None, description='If present, localized object detection has completed successfully. This will be sorted descending by confidence score.', ) logoAnnotations: Optional[List[GoogleCloudVisionV1p3beta1EntityAnnotation]] = Field( None, description='If present, logo detection has completed successfully.' ) productSearchResults: Optional[GoogleCloudVisionV1p3beta1ProductSearchResults] = ( Field( None, description='If present, product search has completed successfully.' ) ) safeSearchAnnotation: Optional[GoogleCloudVisionV1p3beta1SafeSearchAnnotation] = ( Field( None, description='If present, safe-search annotation has completed successfully.', ) ) textAnnotations: Optional[List[GoogleCloudVisionV1p3beta1EntityAnnotation]] = Field( None, description='If present, text (OCR) detection has completed successfully.' ) webDetection: Optional[GoogleCloudVisionV1p3beta1WebDetection] = Field( None, description='If present, web detection has completed successfully.' ) class GoogleCloudVisionV1p4beta1AnnotateImageResponse(BaseModel): context: Optional[GoogleCloudVisionV1p4beta1ImageAnnotationContext] = Field( None, description='If present, contextual information is needed to understand where this image comes from.', ) cropHintsAnnotation: Optional[GoogleCloudVisionV1p4beta1CropHintsAnnotation] = ( Field(None, description='If present, crop hints have completed successfully.') ) error: Optional[Status] = Field( None, description='If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set.', ) faceAnnotations: Optional[List[GoogleCloudVisionV1p4beta1FaceAnnotation]] = Field( None, description='If present, face detection has completed successfully.' ) fullTextAnnotation: Optional[GoogleCloudVisionV1p4beta1TextAnnotation] = Field( None, description='If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text.', ) imagePropertiesAnnotation: Optional[GoogleCloudVisionV1p4beta1ImageProperties] = ( Field( None, description='If present, image properties were extracted successfully.', ) ) labelAnnotations: Optional[List[GoogleCloudVisionV1p4beta1EntityAnnotation]] = ( Field( None, description='If present, label detection has completed successfully.' ) ) landmarkAnnotations: Optional[List[GoogleCloudVisionV1p4beta1EntityAnnotation]] = ( Field( None, description='If present, landmark detection has completed successfully.', ) ) localizedObjectAnnotations: Optional[ List[GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation] ] = Field( None, description='If present, localized object detection has completed successfully. This will be sorted descending by confidence score.', ) logoAnnotations: Optional[List[GoogleCloudVisionV1p4beta1EntityAnnotation]] = Field( None, description='If present, logo detection has completed successfully.' ) productSearchResults: Optional[GoogleCloudVisionV1p4beta1ProductSearchResults] = ( Field( None, description='If present, product search has completed successfully.' ) ) safeSearchAnnotation: Optional[GoogleCloudVisionV1p4beta1SafeSearchAnnotation] = ( Field( None, description='If present, safe-search annotation has completed successfully.', ) ) textAnnotations: Optional[List[GoogleCloudVisionV1p4beta1EntityAnnotation]] = Field( None, description='If present, text (OCR) detection has completed successfully.' ) webDetection: Optional[GoogleCloudVisionV1p4beta1WebDetection] = Field( None, description='If present, web detection has completed successfully.' ) class AnnotateFileResponse(BaseModel): error: Optional[Status] = Field( None, description='If set, represents the error message for the failed request. The `responses` field will not be set in this case.', ) inputConfig: Optional[InputConfig] = Field( None, description='Information about the file for which this response is generated.', ) responses: Optional[List[AnnotateImageResponse]] = Field( None, description='Individual responses to images found within the file. This field will be empty if the `error` field is set.', ) totalPages: Optional[int] = Field( None, description='This field gives the total number of pages in the file.' ) class BatchAnnotateFilesResponse(BaseModel): responses: Optional[List[AnnotateFileResponse]] = Field( None, description='The list of file annotation responses, each response corresponding to each AnnotateFileRequest in BatchAnnotateFilesRequest.', ) class GoogleCloudVisionV1p1beta1AnnotateFileResponse(BaseModel): error: Optional[Status] = Field( None, description='If set, represents the error message for the failed request. The `responses` field will not be set in this case.', ) inputConfig: Optional[GoogleCloudVisionV1p1beta1InputConfig] = Field( None, description='Information about the file for which this response is generated.', ) responses: Optional[List[GoogleCloudVisionV1p1beta1AnnotateImageResponse]] = Field( None, description='Individual responses to images found within the file. This field will be empty if the `error` field is set.', ) totalPages: Optional[int] = Field( None, description='This field gives the total number of pages in the file.' ) class GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse(BaseModel): responses: Optional[List[GoogleCloudVisionV1p1beta1AnnotateFileResponse]] = Field( None, description='The list of file annotation responses, each response corresponding to each AnnotateFileRequest in BatchAnnotateFilesRequest.', ) class GoogleCloudVisionV1p2beta1AnnotateFileResponse(BaseModel): error: Optional[Status] = Field( None, description='If set, represents the error message for the failed request. The `responses` field will not be set in this case.', ) inputConfig: Optional[GoogleCloudVisionV1p2beta1InputConfig] = Field( None, description='Information about the file for which this response is generated.', ) responses: Optional[List[GoogleCloudVisionV1p2beta1AnnotateImageResponse]] = Field( None, description='Individual responses to images found within the file. This field will be empty if the `error` field is set.', ) totalPages: Optional[int] = Field( None, description='This field gives the total number of pages in the file.' ) class GoogleCloudVisionV1p3beta1AnnotateFileResponse(BaseModel): error: Optional[Status] = Field( None, description='If set, represents the error message for the failed request. The `responses` field will not be set in this case.', ) inputConfig: Optional[GoogleCloudVisionV1p3beta1InputConfig] = Field( None, description='Information about the file for which this response is generated.', ) responses: Optional[List[GoogleCloudVisionV1p3beta1AnnotateImageResponse]] = Field( None, description='Individual responses to images found within the file. This field will be empty if the `error` field is set.', ) totalPages: Optional[int] = Field( None, description='This field gives the total number of pages in the file.' ) class GoogleCloudVisionV1p4beta1AnnotateFileResponse(BaseModel): error: Optional[Status] = Field( None, description='If set, represents the error message for the failed request. The `responses` field will not be set in this case.', ) inputConfig: Optional[GoogleCloudVisionV1p4beta1InputConfig] = Field( None, description='Information about the file for which this response is generated.', ) responses: Optional[List[GoogleCloudVisionV1p4beta1AnnotateImageResponse]] = Field( None, description='Individual responses to images found within the file. This field will be empty if the `error` field is set.', ) totalPages: Optional[int] = Field( None, description='This field gives the total number of pages in the file.' ) class GoogleCloudVisionV1p4beta1BatchAnnotateFilesResponse(BaseModel): responses: Optional[List[GoogleCloudVisionV1p4beta1AnnotateFileResponse]] = Field( None, description='The list of file annotation responses, each response corresponding to each AnnotateFileRequest in BatchAnnotateFilesRequest.', )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ag2-mcp-servers/cloud-vision-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server