UNPKG

@google-cloud/vision

Version:
992 lines (816 loc) 2.77 MB
// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import type {protobuf as $protobuf} from "google-gax"; import Long = require("long"); /** Namespace google. */ export namespace google { /** Namespace cloud. */ namespace cloud { /** Namespace vision. */ namespace vision { /** Namespace v1. */ namespace v1 { /** Properties of a Vertex. */ interface IVertex { /** Vertex x */ x?: (number|null); /** Vertex y */ y?: (number|null); } /** Represents a Vertex. */ class Vertex implements IVertex { /** * Constructs a new Vertex. * @param [properties] Properties to set */ constructor(properties?: google.cloud.vision.v1.IVertex); /** Vertex x. */ public x: number; /** Vertex y. */ public y: number; /** * Creates a new Vertex instance using the specified properties. * @param [properties] Properties to set * @returns Vertex instance */ public static create(properties?: google.cloud.vision.v1.IVertex): google.cloud.vision.v1.Vertex; /** * Encodes the specified Vertex message. Does not implicitly {@link google.cloud.vision.v1.Vertex.verify|verify} messages. * @param message Vertex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: google.cloud.vision.v1.IVertex, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Vertex message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Vertex.verify|verify} messages. * @param message Vertex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: google.cloud.vision.v1.IVertex, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Vertex message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns Vertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.vision.v1.Vertex; /** * Decodes a Vertex message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns Vertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.vision.v1.Vertex; /** * Verifies a Vertex message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Vertex message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Vertex */ public static fromObject(object: { [k: string]: any }): google.cloud.vision.v1.Vertex; /** * Creates a plain object from a Vertex message. Also converts values to other types if specified. * @param message Vertex * @param [options] Conversion options * @returns Plain object */ public static toObject(message: google.cloud.vision.v1.Vertex, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Vertex to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for Vertex * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a NormalizedVertex. */ interface INormalizedVertex { /** NormalizedVertex x */ x?: (number|null); /** NormalizedVertex y */ y?: (number|null); } /** Represents a NormalizedVertex. */ class NormalizedVertex implements INormalizedVertex { /** * Constructs a new NormalizedVertex. * @param [properties] Properties to set */ constructor(properties?: google.cloud.vision.v1.INormalizedVertex); /** NormalizedVertex x. */ public x: number; /** NormalizedVertex y. */ public y: number; /** * Creates a new NormalizedVertex instance using the specified properties. * @param [properties] Properties to set * @returns NormalizedVertex instance */ public static create(properties?: google.cloud.vision.v1.INormalizedVertex): google.cloud.vision.v1.NormalizedVertex; /** * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.vision.v1.NormalizedVertex.verify|verify} messages. * @param message NormalizedVertex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: google.cloud.vision.v1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.vision.v1.NormalizedVertex.verify|verify} messages. * @param message NormalizedVertex message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: google.cloud.vision.v1.INormalizedVertex, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a NormalizedVertex message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns NormalizedVertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.vision.v1.NormalizedVertex; /** * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns NormalizedVertex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.vision.v1.NormalizedVertex; /** * Verifies a NormalizedVertex message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns NormalizedVertex */ public static fromObject(object: { [k: string]: any }): google.cloud.vision.v1.NormalizedVertex; /** * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified. * @param message NormalizedVertex * @param [options] Conversion options * @returns Plain object */ public static toObject(message: google.cloud.vision.v1.NormalizedVertex, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this NormalizedVertex to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for NormalizedVertex * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BoundingPoly. */ interface IBoundingPoly { /** BoundingPoly vertices */ vertices?: (google.cloud.vision.v1.IVertex[]|null); /** BoundingPoly normalizedVertices */ normalizedVertices?: (google.cloud.vision.v1.INormalizedVertex[]|null); } /** Represents a BoundingPoly. */ class BoundingPoly implements IBoundingPoly { /** * Constructs a new BoundingPoly. * @param [properties] Properties to set */ constructor(properties?: google.cloud.vision.v1.IBoundingPoly); /** BoundingPoly vertices. */ public vertices: google.cloud.vision.v1.IVertex[]; /** BoundingPoly normalizedVertices. */ public normalizedVertices: google.cloud.vision.v1.INormalizedVertex[]; /** * Creates a new BoundingPoly instance using the specified properties. * @param [properties] Properties to set * @returns BoundingPoly instance */ public static create(properties?: google.cloud.vision.v1.IBoundingPoly): google.cloud.vision.v1.BoundingPoly; /** * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.vision.v1.BoundingPoly.verify|verify} messages. * @param message BoundingPoly message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: google.cloud.vision.v1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.vision.v1.BoundingPoly.verify|verify} messages. * @param message BoundingPoly message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: google.cloud.vision.v1.IBoundingPoly, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a BoundingPoly message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns BoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.vision.v1.BoundingPoly; /** * Decodes a BoundingPoly message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns BoundingPoly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.vision.v1.BoundingPoly; /** * Verifies a BoundingPoly message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns BoundingPoly */ public static fromObject(object: { [k: string]: any }): google.cloud.vision.v1.BoundingPoly; /** * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified. * @param message BoundingPoly * @param [options] Conversion options * @returns Plain object */ public static toObject(message: google.cloud.vision.v1.BoundingPoly, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this BoundingPoly to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for BoundingPoly * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Position. */ interface IPosition { /** Position x */ x?: (number|null); /** Position y */ y?: (number|null); /** Position z */ z?: (number|null); } /** Represents a Position. */ class Position implements IPosition { /** * Constructs a new Position. * @param [properties] Properties to set */ constructor(properties?: google.cloud.vision.v1.IPosition); /** Position x. */ public x: number; /** Position y. */ public y: number; /** Position z. */ public z: number; /** * Creates a new Position instance using the specified properties. * @param [properties] Properties to set * @returns Position instance */ public static create(properties?: google.cloud.vision.v1.IPosition): google.cloud.vision.v1.Position; /** * Encodes the specified Position message. Does not implicitly {@link google.cloud.vision.v1.Position.verify|verify} messages. * @param message Position message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: google.cloud.vision.v1.IPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Position message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Position.verify|verify} messages. * @param message Position message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: google.cloud.vision.v1.IPosition, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Position message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns Position * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.vision.v1.Position; /** * Decodes a Position message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns Position * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.vision.v1.Position; /** * Verifies a Position message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Position message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Position */ public static fromObject(object: { [k: string]: any }): google.cloud.vision.v1.Position; /** * Creates a plain object from a Position message. Also converts values to other types if specified. * @param message Position * @param [options] Conversion options * @returns Plain object */ public static toObject(message: google.cloud.vision.v1.Position, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Position to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for Position * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Represents an ImageAnnotator */ class ImageAnnotator extends $protobuf.rpc.Service { /** * Constructs a new ImageAnnotator service. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited */ constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); /** * Creates new ImageAnnotator service using the specified rpc implementation. * @param rpcImpl RPC implementation * @param [requestDelimited=false] Whether requests are length-delimited * @param [responseDelimited=false] Whether responses are length-delimited * @returns RPC service. Useful where requests and/or responses are streamed. */ public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ImageAnnotator; /** * Calls BatchAnnotateImages. * @param request BatchAnnotateImagesRequest message or plain object * @param callback Node-style callback called with the error, if any, and BatchAnnotateImagesResponse */ public batchAnnotateImages(request: google.cloud.vision.v1.IBatchAnnotateImagesRequest, callback: google.cloud.vision.v1.ImageAnnotator.BatchAnnotateImagesCallback): void; /** * Calls BatchAnnotateImages. * @param request BatchAnnotateImagesRequest message or plain object * @returns Promise */ public batchAnnotateImages(request: google.cloud.vision.v1.IBatchAnnotateImagesRequest): Promise<google.cloud.vision.v1.BatchAnnotateImagesResponse>; /** * Calls BatchAnnotateFiles. * @param request BatchAnnotateFilesRequest message or plain object * @param callback Node-style callback called with the error, if any, and BatchAnnotateFilesResponse */ public batchAnnotateFiles(request: google.cloud.vision.v1.IBatchAnnotateFilesRequest, callback: google.cloud.vision.v1.ImageAnnotator.BatchAnnotateFilesCallback): void; /** * Calls BatchAnnotateFiles. * @param request BatchAnnotateFilesRequest message or plain object * @returns Promise */ public batchAnnotateFiles(request: google.cloud.vision.v1.IBatchAnnotateFilesRequest): Promise<google.cloud.vision.v1.BatchAnnotateFilesResponse>; /** * Calls AsyncBatchAnnotateImages. * @param request AsyncBatchAnnotateImagesRequest message or plain object * @param callback Node-style callback called with the error, if any, and Operation */ public asyncBatchAnnotateImages(request: google.cloud.vision.v1.IAsyncBatchAnnotateImagesRequest, callback: google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateImagesCallback): void; /** * Calls AsyncBatchAnnotateImages. * @param request AsyncBatchAnnotateImagesRequest message or plain object * @returns Promise */ public asyncBatchAnnotateImages(request: google.cloud.vision.v1.IAsyncBatchAnnotateImagesRequest): Promise<google.longrunning.Operation>; /** * Calls AsyncBatchAnnotateFiles. * @param request AsyncBatchAnnotateFilesRequest message or plain object * @param callback Node-style callback called with the error, if any, and Operation */ public asyncBatchAnnotateFiles(request: google.cloud.vision.v1.IAsyncBatchAnnotateFilesRequest, callback: google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateFilesCallback): void; /** * Calls AsyncBatchAnnotateFiles. * @param request AsyncBatchAnnotateFilesRequest message or plain object * @returns Promise */ public asyncBatchAnnotateFiles(request: google.cloud.vision.v1.IAsyncBatchAnnotateFilesRequest): Promise<google.longrunning.Operation>; } namespace ImageAnnotator { /** * Callback as used by {@link google.cloud.vision.v1.ImageAnnotator|batchAnnotateImages}. * @param error Error, if any * @param [response] BatchAnnotateImagesResponse */ type BatchAnnotateImagesCallback = (error: (Error|null), response?: google.cloud.vision.v1.BatchAnnotateImagesResponse) => void; /** * Callback as used by {@link google.cloud.vision.v1.ImageAnnotator|batchAnnotateFiles}. * @param error Error, if any * @param [response] BatchAnnotateFilesResponse */ type BatchAnnotateFilesCallback = (error: (Error|null), response?: google.cloud.vision.v1.BatchAnnotateFilesResponse) => void; /** * Callback as used by {@link google.cloud.vision.v1.ImageAnnotator|asyncBatchAnnotateImages}. * @param error Error, if any * @param [response] Operation */ type AsyncBatchAnnotateImagesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** * Callback as used by {@link google.cloud.vision.v1.ImageAnnotator|asyncBatchAnnotateFiles}. * @param error Error, if any * @param [response] Operation */ type AsyncBatchAnnotateFilesCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; } /** Likelihood enum. */ enum Likelihood { UNKNOWN = 0, VERY_UNLIKELY = 1, UNLIKELY = 2, POSSIBLE = 3, LIKELY = 4, VERY_LIKELY = 5 } /** Properties of a Feature. */ interface IFeature { /** Feature type */ type?: (google.cloud.vision.v1.Feature.Type|keyof typeof google.cloud.vision.v1.Feature.Type|null); /** Feature maxResults */ maxResults?: (number|null); /** Feature model */ model?: (string|null); } /** Represents a Feature. */ class Feature implements IFeature { /** * Constructs a new Feature. * @param [properties] Properties to set */ constructor(properties?: google.cloud.vision.v1.IFeature); /** Feature type. */ public type: (google.cloud.vision.v1.Feature.Type|keyof typeof google.cloud.vision.v1.Feature.Type); /** Feature maxResults. */ public maxResults: number; /** Feature model. */ public model: string; /** * Creates a new Feature instance using the specified properties. * @param [properties] Properties to set * @returns Feature instance */ public static create(properties?: google.cloud.vision.v1.IFeature): google.cloud.vision.v1.Feature; /** * Encodes the specified Feature message. Does not implicitly {@link google.cloud.vision.v1.Feature.verify|verify} messages. * @param message Feature message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: google.cloud.vision.v1.IFeature, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Feature message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Feature.verify|verify} messages. * @param message Feature message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: google.cloud.vision.v1.IFeature, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Feature message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns Feature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.vision.v1.Feature; /** * Decodes a Feature message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns Feature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.vision.v1.Feature; /** * Verifies a Feature message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates a Feature message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Feature */ public static fromObject(object: { [k: string]: any }): google.cloud.vision.v1.Feature; /** * Creates a plain object from a Feature message. Also converts values to other types if specified. * @param message Feature * @param [options] Conversion options * @returns Plain object */ public static toObject(message: google.cloud.vision.v1.Feature, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Feature to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for Feature * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Feature { /** Type enum. */ enum Type { TYPE_UNSPECIFIED = 0, FACE_DETECTION = 1, LANDMARK_DETECTION = 2, LOGO_DETECTION = 3, LABEL_DETECTION = 4, TEXT_DETECTION = 5, DOCUMENT_TEXT_DETECTION = 11, SAFE_SEARCH_DETECTION = 6, IMAGE_PROPERTIES = 7, CROP_HINTS = 9, WEB_DETECTION = 10, PRODUCT_SEARCH = 12, OBJECT_LOCALIZATION = 19 } } /** Properties of an ImageSource. */ interface IImageSource { /** ImageSource gcsImageUri */ gcsImageUri?: (string|null); /** ImageSource imageUri */ imageUri?: (string|null); } /** Represents an ImageSource. */ class ImageSource implements IImageSource { /** * Constructs a new ImageSource. * @param [properties] Properties to set */ constructor(properties?: google.cloud.vision.v1.IImageSource); /** ImageSource gcsImageUri. */ public gcsImageUri: string; /** ImageSource imageUri. */ public imageUri: string; /** * Creates a new ImageSource instance using the specified properties. * @param [properties] Properties to set * @returns ImageSource instance */ public static create(properties?: google.cloud.vision.v1.IImageSource): google.cloud.vision.v1.ImageSource; /** * Encodes the specified ImageSource message. Does not implicitly {@link google.cloud.vision.v1.ImageSource.verify|verify} messages. * @param message ImageSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: google.cloud.vision.v1.IImageSource, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified ImageSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ImageSource.verify|verify} messages. * @param message ImageSource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: google.cloud.vision.v1.IImageSource, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an ImageSource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns ImageSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.vision.v1.ImageSource; /** * Decodes an ImageSource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns ImageSource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.vision.v1.ImageSource; /** * Verifies an ImageSource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates an ImageSource message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns ImageSource */ public static fromObject(object: { [k: string]: any }): google.cloud.vision.v1.ImageSource; /** * Creates a plain object from an ImageSource message. Also converts values to other types if specified. * @param message ImageSource * @param [options] Conversion options * @returns Plain object */ public static toObject(message: google.cloud.vision.v1.ImageSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this ImageSource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for ImageSource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Image. */ interface IImage { /** Image content */ content?: (Uint8Array|Buffer|string|null); /** Image source */ source?: (google.cloud.vision.v1.IImageSource|null); } /** Represents an Image. */ class Image implements IImage { /** * Constructs a new Image. * @param [properties] Properties to set */ constructor(properties?: google.cloud.vision.v1.IImage); /** Image content. */ public content: (Uint8Array|Buffer|string); /** Image source. */ public source?: (google.cloud.vision.v1.IImageSource|null); /** * Creates a new Image instance using the specified properties. * @param [properties] Properties to set * @returns Image instance */ public static create(properties?: google.cloud.vision.v1.IImage): google.cloud.vision.v1.Image; /** * Encodes the specified Image message. Does not implicitly {@link google.cloud.vision.v1.Image.verify|verify} messages. * @param message Image message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encode(message: google.cloud.vision.v1.IImage, writer?: $protobuf.Writer): $protobuf.Writer; /** * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Image.verify|verify} messages. * @param message Image message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ public static encodeDelimited(message: google.cloud.vision.v1.IImage, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an Image message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand * @returns Image * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.vision.v1.Image; /** * Decodes an Image message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from * @returns Image * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.vision.v1.Image; /** * Verifies an Image message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** * Creates an Image message from a plain object. Also converts values to their respective internal types. * @param object Plain object * @returns Image */ public static fromObject(object: { [k: string]: any }): google.cloud.vision.v1.Image; /** * Creates a plain object from an Image message. Also converts values to other types if specified. * @param message Image * @param [options] Conversion options * @returns Plain object */ public static toObject(message: google.cloud.vision.v1.Image, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Image to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** * Gets the default type url for Image * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a FaceAnnotation. */ interface IFaceAnnotation { /** FaceAnnotation boundingPoly */ boundingPoly?: (google.cloud.vision.v1.IBoundingPoly|null); /** FaceAnnotation fdBoundingPoly */ fdBoundingPoly?: (google.cloud.vision.v1.IBoundingPoly|null); /** FaceAnnotation landmarks */ landmarks?: (google.cloud.vision.v1.FaceAnnotation.ILandmark[]|null); /** FaceAnnotation rollAngle */ rollAngle?: (number|null); /** FaceAnnotation panAngle */ panAngle?: (number|null); /** FaceAnnotation tiltAngle */ tiltAngle?: (number|null); /** FaceAnnotation detectionConfidence */ detectionConfidence?: (number|null); /** FaceAnnotation landmarkingConfidence */ landmarkingConfidence?: (number|null); /** FaceAnnotation joyLikelihood */ joyLikelihood?: (google.cloud.vision.v1.Likelihood|keyof typeof google.cloud.vision.v1.Likelihood|null); /** FaceAnnotation sorrowLikelihood */ sorrowLikelihood?: (google.cloud.vision.v1.Likelihood|keyof typeof google.cloud.vision.v1.Likelihood|null); /** FaceAnnotation angerLikelihood */ angerLikelihood?: (google.cloud.vision.v1.Likelihood|keyof typeof google.cloud.vision.v1.Likelihood|null); /** FaceAnnotation surpriseLikelihood */ surpriseLikelihood?: (google.cloud.vision.v1.Likelihood|keyof typeof google.cloud.vision.v1.Likelihood|null); /** FaceAnnotation underExposedLikelihood */ underExposedLikelihood?: (google.cloud.vision.v1.Likelihood|keyof typeof google.cloud.vision.v1.Likelihood|null); /** FaceAnnotation blurredLikelihood */ blurredLikelihood?: (google.cloud.vision.v1.Likelihood|keyof typeof google.cloud.vision.v1.Likelihood|null); /** FaceAnnotation headwearLikelihood */ headwearLikelihood?: (google.cloud.vision.v1.Likelihood|keyof typeof google.cloud.vision.v1.Likelihood|null); } /** Represents a FaceAnnotation. */ class FaceAnnotation implements IFaceAnnotation { /** * Constructs a new FaceAnnotation. * @param [properties] Properties to set */ constructor(properties?: google.cloud.vision.v1.IFaceAnnotation); /** FaceAnnotation boundingPoly. */ public boundingPoly?: (google.cloud.vision.v1.IBoundingPoly|null); /** FaceAnnotation fdBoundingPoly. */ public fdBoundingPoly?: (google.cloud.vision.v1.IBoundingPoly|null); /** FaceAnnotation landmarks. */ public landmarks: google.cloud.vision.v1.FaceAnnotation.ILandmark[]; /** FaceAnnotation rollAngle. */ public rollAngle: number; /** FaceAnnotation panAngle. */ public panAngle: number; /** FaceAnnotation tiltAngle. */ public tiltAngle: number; /** FaceAnnotation detectionConfidence. */ public detectionConfidence: number; /** FaceAnnotation landmarkingConfidence. */ public landmarkingConfidence: number; /** FaceAnnotation joyLikelihood. */ public joyLikelihood: (google.cloud.vision.v1.Likelihood|keyof typeof google.cloud.vision.v1.Likelihood); /** FaceAnnotation sorrowLikelihood. */ public sorrowLikelihood: (google.cloud.vision.v1.Likelihood|keyof typeof google.cloud.vision.v1.Likelihood); /** FaceAnnotation angerLikelihood. */ public angerLikelihood: (google.cloud.vision.v1.Likelihood|keyof typeof google.cloud.vision.v1.Likelihood); /** FaceAnnotation surpriseLikelihood. */ public